编译的程序集中缺少ASP.global_asax

时间:2009-12-01 21:22:16

标签: asp.net global-asax aspnet-compiler

我正在使用aspnet ___ compiler.exe来编译我的asp.net 3.5SP1网站, 然后aspnet_merge.exe将程序集合并为一个程序集。

然后将程序集上载到生产服务器。这通常很有效,但有时在登台服务器上测试我得到了 以下消息:

  

Parser Error Message: Could not load file or assembly 'App_global.asax, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

使用Reflector查看程序集并将其与同一程序集的工作版本进行比较时,我发现ASP.global_asax类型确实缺失。

当更改网站上的内容并再次编译时,我会得到一个包含'ASP.global_asax'的工作版本。

这有点烦人,我想知道在某些特殊情况下这是否是编译器中的错误?

还有其他人遇到过这个并找到了解决方法吗?