When running a web application project, at seemingly random times a page may fail with a CS0433 error: type exists in multiple DLL's. The DLL's are all generated DLL's residing in the "Temporary ASP.NET Files" directory.
ASP.Net error: “The type ‘foo’ exists in both “temp1.dll” and “temp2.dll”
asp.net
Related Topic
- C# – The breakpoint will not currently be hit. No symbols have been loaded for this document in a Silverlight application
- .net – ASP.Net error: “The type ‘foo’ exists in both ”temp1.dll“ and ”temp2.dll” (pt 2)
- Asp.net-mvc – Error: The type exists in both directories
- CS0433: The type ‘CrystalDecisions.Web.CrystalReportViewer’ exists in both
- C# – Login failed for user ‘IIS APPPOOL\ASP.NET v4.0’
- R – Objective-C: How to cast a boolean as an object for use with NSKeyedArchiver
Best Answer
Add the batch="false" attribute to the "compilation" element of the web.config file.
This problem occurs because of the way in which ASP.NET 2.0 uses the application references and the folder structure of the application to compile the application. If the batch property of the element in the web.config file for the application is set to true, ASP.NET 2.0 compiles each folder in the application into a separate assembly.
http://www.sellsbrothers.com/1995
http://support.microsoft.com/kb/919284