Si8
Si8

Reputation: 9225

Why running a web application gives a duplicate dll file error

I recently converted my website into a web application (pain in the behind). After everything was said and done and loaded all the libraries and fixed all the errors I decided to run it. I received the following error:

Compiler Error Message: CS0433: The type 'WebSite5.BundleConfig' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\dc09734f\e0cd1143\App_Code.f12uuiuu.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\dc09734f\e0cd1143\assembly\dl3\f6c46402\e43f8fd6_b679cf01\WMEXEC.DLL'

Source Error:

Line 9:      {
Line 10:         // Code that runs on application startup
Line 11:         BundleConfig.RegisterBundles(BundleTable.Bundles);
Line 12:         AuthConfig.RegisterOpenAuth();
Line 13:         RouteConfig.RegisterRoutes(RouteTable.Routes);


Source File: c:\Users\usrsn\Documents\Visual Studio 2012\Projects\WMEXEC SLN\WMEXEC\Global.asax    Line: 11

I tried going into the folder and deleting everything as other posts have recommended and cleaned and rebuilt my solution and ran it again and I got the same error.

How can I resolve the error?

Upvotes: 1

Views: 1312

Answers (1)

user2316116
user2316116

Reputation: 6814

Possible duplicate with ASP.Net error: "The type 'foo' exists in both "temp1.dll" and "temp2.dll".

Add the batch="false" attribute to the "compilation" element of the web.config file.

Upvotes: 1

Related Questions