We recently upgraded our website project to Visual Studio 2010.
I am now getting this error whenever I try to Publish the Website with the “Allow this precompiled site to be updatable” checked.
This worked previously using Visual Studio 2008 so I am not sure why it is not working now.
The type or namespace name 'xxxxxxxxx_ascx' does not exist in the namespace 'ASP'
(are you missing an assembly reference?)
The lines causing the error are all doing this sort of thing.
ASP.content_Controls_Info_ascx infoControl = new ASP.content_Controls_Info_ascx();
infoControl.Stages = query.ToList();
PlaceHolder1.Controls.Add(infoControl);
I have not upgraded anything else so the dot net framework is still 3.5
The site builds fine and a publish works without “Allow this precompiled site to be updatable” checked. The content_Controls_Info_ascx part of the code also highlights the class name so it is finding it.
In .sln file find section related to your Web Site Project. It looks like this:
and set following properties to “false” (I used Notepad to edit .sln file):
by default they were set to “true” and error was occurred:
This solution helped me.