编译的程序集中缺少 ASP.global_asax
我正在使用 aspnet___compiler.exe 编译我的 asp.net 3.5SP1 网站, 然后 aspnet_merge.exe 将程序集合并为一个程序集。
然后将程序集上传到生产服务器。这通常工作得很好,但有时在临时服务器上测试时我会得到 以下消息:
解析器错误消息:无法加载 文件或程序集'App_global.asax, 版本=0.0.0.0,文化=中立, PublicKeyToken=null' 或其之一 依赖关系。系统找不到 指定的文件。
使用 Reflector 查看程序集并进行比较时它与同一程序集的工作版本我发现类型 ASP.global_asax 确实丢失了。
当更改网站上的某些内容并再次编译时,我得到一个包含“ASP.global_asax”的工作版本。
这有点烦人,我想知道这是否是编译器在某些特殊情况下的错误?
还有其他人遇到过这个问题并知道如何解决它吗?
I am using aspnet___compiler.exe to compile my asp.net 3.5SP1 websites,
then aspnet_merge.exe to merge the assemblies into a single one.
The assembly is then uploaded to the production server. This usually works pretty well but sometimes when testing on the staging server I get the
following message:
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.
When looking at the assembly with Reflector and comparing it with a working version of the same assembly I see that the type ASP.global_asax is indeed missing.
When changing something on the site and compiling it again, I get a working version that includes 'ASP.global_asax'.
This is kind of annoying, I am wondering whether this is a bug in the compiler in some special circumstances?
Anybody else encountered this and found out how to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我今天遇到了这个问题,发现了这个:
http://blogs.msdn.com /b/isha/archive/2009/04/04/issues-with-wcf-service-when-the-asp-net-website-is-deployed-using-the-web-deployment-project-and-as-non -可更新项目.aspx
I've been running into this issue today and found this:
http://blogs.msdn.com/b/isha/archive/2009/04/04/issues-with-wcf-service-when-the-asp-net-website-is-deployed-using-the-web-deployment-project-and-as-non-updatable-project.aspx