Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
247 views
in Technique[技术] by (71.8m points)

c# - Compilation Error: The type 'ASP.global_asax' exists in both DLLs

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:

"The type 'ASP.global_asax' exists in both 'c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesimesheet15a75c54898b48b9assemblydl358b062b20ceda54_c98cc801App_global.asax.DLL' and 'c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesimesheet15a75c54898b48b9App_global.asax.q_h6dbfx.dll' c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesimesheet15a75c54898b48b9App_Web_admin.master.fdf7a39c.zecazgwd.0.cs "

Setting "batch=false" into web.config's is not working. I have also tried to delete all folders from "c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files", then clean and rebuild soultion. But still it's not working.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...