I cannot deploy my asp.net 4.5 website because I am getting multiple dreaded "The type 'myClassX' exists in both C:\Users\Me\...\whereItsSupposedToBe\
and C:\Users\Me\AppData\Local\Temp\Temporary ASP.NET Files\root\1randomname\_shadow\2randomname\3randomname\App_web_myClassX.cs.4acf3bb.nommceoi.dll
errors.
There are three files involved. MyClasses.cs
contains definitions for MyClassB
, MyClassC
, MyClassD
. Page1.aspx
and page2.aspx
include in their <%page %>
tag a src attribute for MyClasses.cs
.
I have so far done the following:
- cleaned the solution and project
- shut down VS12
- deleted the root\1randomname directory and emptied the recycling bin
- restarted the #^$@ing computer
- deleted the offending files, cleaned and built, created new files and renamed all involved filenames, classes and namespaces (oh yeah, they all used to be'myOGClassA'....)
- introduced dummy variables hoping that would change the dll
- deleted the bin and obj directories
- added the
batch="false"
attribute to thecompilation
element of theweb.config
file as mentioned here: ASP.Net error: "The type 'foo' exists in both "temp1.dll" and "temp2.dll"
Something makes me wonder if having two of the aspx
files having references to the same src file has something to do with it. But in all the blogs and SO posts Iv seen so far that would result in the conflicts both coming from the temp directories.
Head starting to hurt... Any suggestions?