Base class includes field but type not compatible with type of control

Unckeck the build (and publish) option "Allow this precompiled site to be updatable"

It might not be enought for the runtime, so check the option "use fixed naming and single page assemblies" and it solved my case :)

here is a useful link about this error: http://forums.asp.net/t/960707.aspx


Try specifying the assembly name too:

<add tagPrefix="CControls" namespace="web.App_Code" assembly="web.App_Code" />

I would consider creating a dedicated namespace for your custom controls, just for the sake of clarity. Maybe something like web.App_Code.CustomControls:

<add tagPrefix="CControls" namespace="web.App_Code.CustomControls" assembly="web.App_Code.CustomControls" />