【转】一个奇怪的错误:类型“ControlBase”在未被引用的程序集中定义 必须添加对程序集“App_Code.xxxx, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null”

本来一切如常,可突然就在开发时遇到了这么一个页面异常:

类型“ControlBase”在未被引用的程序集中定义。必须添加对程序集“App_Code.wxpx7wio, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null”的引用。

回想自己做了什么操作导致了这个错误发生,结果是没有,这个错误莫名其妙的出现,让人惊诧不已。花了二十分钟在网上找寻答案,终有收获,如下:

ASP.NET论坛上的billr578说微软建议: (theysuggested) setting batch compilation to false.? Basically putbatch="false" in the compiliation tag in your web.config.? Apparentlythis is an issue they're working on.

在WEB.CONFIG处配置:<compilation debug="true" batch="false">,问题解决。

原文地址:https://www.cnblogs.com/TSPWater/p/1623663.html