Error CS0433: The type 'Resources.labels' exists in both...

Topics: ASP.NET 2.0
Dec 1, 2010 at 3:16 AM

I just upgraded my blog (http://jeffcren.com) to 1.6.1 from 1.6.0 in order to use the reCaptcha extension.  After the upgrade, I am getting this error:

Compiler Error Message: CS0433: The type 'Resources.labels' exists in both 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\9fd92f87\45a2ba06\assembly\dl3\a64307f6\f14811b8_0291cb01\App_GlobalResources.DLL' and 'c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\9fd92f87\45a2ba06\App_GlobalResources.md7pit6m.dll'

I was able to fix the error locally by deleting the Temporary ASP.NET Files, but I can't do this on my hosting server (GoDaddy). Is there something I can do to fix the error?

I have turned custom errors off, so you can see the error on my site now.

 

Thanks,

Jeff

Coordinator
Dec 1, 2010 at 4:47 AM

Not sure if it'll work, but you might want to try restarting the blog, by temporarily renaming BlogEngine.Core.dll to a different name, and then rename it back to BlogEngine.Core.dll.  This might fix it.  This file is in the /BIN directory.

Coordinator
Dec 1, 2010 at 4:52 AM

Sometimes it happens when you update asp.net web site. Try to reload application pool by modifying web.config. If you already did it (turned off custom errors as you mentioned) - you may just wait a while and it will go away all by itself. Reboot would fix it, but if you on GoDaddy this is obviously not an option, unless you can request it through support.

Dec 1, 2010 at 2:31 PM
Edited Dec 1, 2010 at 2:43 PM

@BenAmada I tried renaming BlogEngine.Core.dll to BlogEngine.Core2.dll and then back, but I still get the same error.

@rtur I have turned Custom Errors on and off several times since last night, but I am still getting the error. I doubt I can request a server reboot form GoDaddy, but I can try if there are no other options.

 

A little more info...

I upgraded my local code from 1.6.0 to 1.6.1, then published via FTP through WebMatrix.  The source file and line number where it breaks varies, but it is always the same basic message.  What differs is the "md7pt66m" section of the App_GlobalResources.md7pit6m.dll (the second file path in the error message).

Coordinator
Dec 1, 2010 at 11:20 PM

See this post.  You might want to try adding batch="false" to the existing <compilation> tag in the web.config file as suggested as a workaround in that post.

Dec 2, 2010 at 1:19 PM

@BenAmada No luck with adding batch="false" to web.config.  I still get the same error message.

Coordinator
Dec 2, 2010 at 6:09 PM

Googling around, the other possibility is that you have 2 or more files that have the same class name.

Even though where the error is occurring is varying, the main error message at the top is the same.  It is:  "The type 'Resources.labels' exists in both .....".  I would check the App_GlobalResources folder and look for anything out of the ordinary.  In BE 1.6.1, it looks like there should be 34 .RESX files in there.  See how many you have.  You might want to even try deleting all of the files and re-uploading them -- assuming you don't have a bad one or duplicate one on your own computer that you might re-upload.

Dec 3, 2010 at 1:58 AM

Well, there weren't any duplicate files or anything, so I started from scratch.  I deleted all files from the server, then downloaded a clean 1.6.1 web project.  I modified web.config to use the SqlServer db, and uploaded everything again. This time it worked perfectly.  I still don't know what exactly was causing the problem.  Thanks for everyone's help!