编译错误:两个DLL中都存在类型'ASP.global_asax' [英] Compilation Error: The type 'ASP.global_asax' exists in both DLLs
问题描述
我刚刚将另一个项目页面及其dll集成到我现有项目的Bin /文件夹中。我的项目框架是3.5。当我尝试构建项目或解决方案时,会引发以下错误:
I have just integrated another project pages and its dlls into my existing project's Bin/ folder. My project framework is 3.5. When i am trying to build the project or solution, it's throwing following error:
类型'ASP.global_asax'在两个' c:\Windows\Microsoft.NET\Framework\v2.0.50727\ASP.NET临时文件\时间表\15a75c54\898b48b9\程序集dl3\58b062b2\00ceda54_c98cc801\App_global。 asax.DLL和 c:\Windows\Microsoft.NET\Framework\v2.0.50727\临时ASP.NET文件\时间表\15a75c54\898b48b9\App_global.asax.q_h6dbfx.dll c:\Windows\Microsoft.NET\Framework\v2.0.50727\ASP.NET临时文件\时间表\15a75c54\898b48b9\App_Web_admin.master.fdf7a39c.zecazgwd.0.cs
"The type 'ASP.global_asax' exists in both 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\timesheet\15a75c54\898b48b9\assembly\dl3\58b062b2\00ceda54_c98cc801\App_global.asax.DLL' and 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\timesheet\15a75c54\898b48b9\App_global.asax.q_h6dbfx.dll' c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\timesheet\15a75c54\898b48b9\App_Web_admin.master.fdf7a39c.zecazgwd.0.cs "
将 batch = false设置为web.config无效。我还尝试过从 c:\Windows\Microsoft.NET\Framework\v2.0.50727\ASP.NET临时文件\中删除所有文件夹,然后清理并重建灵魂。
Setting "batch=false" into web.config's is not working. I have also tried to delete all folders from "c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\", then clean and rebuild soultion. But still it's not working.
推荐答案
对于我来说,该问题发生在虚拟应用程序的bin文件夹中。查看此bin文件夹,您可能会看到两个文件(我找到的信息 ):
In my case the problem occurred in a virtual application's bin folder. Looking into this bin-folder you will probably see two files (an information I found here):
- App_global.asax.dll
- App_global.asax.compiled
删除这些可以解决该错误。 App_global.asax.dll也会在运行时生成,这会导致问题。但是,我仍在调查这些文件如何到达那里,因此绝对欢迎发表评论!
Removing these resolves the error. The App_global.asax.dll is generated at runtime too which causes the problem. I am however still investigating how these files got there, so comments are definitely welcome!
这篇关于编译错误:两个DLL中都存在类型'ASP.global_asax'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!