我正在使用 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”的工作版本。
这有点烦人,我想知道这是否是某些特殊情况下编译器中的错误?
有没有其他人遇到过这个并发现如何解决它?