【发布时间】:2012-03-19 17:40:34
【问题描述】:
我们最近将网站项目升级到 Visual Studio 2010。
现在,每当我尝试发布网站并选中“允许此预编译的网站可更新”时,我都会收到此错误。
这之前使用 Visual Studio 2008 可以正常工作,所以我不确定为什么现在不能正常工作。
The type or namespace name 'xxxxxxxxx_ascx' does not exist in the namespace 'ASP'
(are you missing an assembly reference?)
导致错误的行都在做这种事情。
ASP.content_Controls_Info_ascx infoControl = new ASP.content_Controls_Info_ascx();
infoControl.Stages = query.ToList();
PlaceHolder1.Controls.Add(infoControl);
我没有升级任何其他东西所以点网框架仍然是3.5
该站点构建良好,并且在没有选中“允许此预编译站点可更新”的情况下发布作品。代码的 content_Controls_Info_ascx 部分也突出显示了类名,以便找到它。
【问题讨论】: