I've got a weird problem with my Web deployment project - I have one class name (from web form code behind class) that appears in both the original web application dll and also the web deployment assembly dll that gets generated.
The web application compiles first and generates its main dll file and then the web deployment project runs and this also generates a dll file. Everything in the release build of the site works fine apart from one page - it complains of "The type 'MyNameSpace.classname' exists in both..." This is the page where the duplicate class name problem exists. For some strange reason I have the same class name in the main web application dll and also the dll file that gets created by the Web deployment project - I have verified this by using Reflector. I can see the class reference in both. There is only this class reference in the web deployment project and a reference to global_asax - apart from that it seems like nothing else in the file.
I have "Merge all outputs into a single assembly" and "Treat as library component" checked.
The web deployment project DLL seems almost redundant, but removing it breaks the site.
Any idea what is causing this problem? Nothing during the build reports failure and its just this one page strangely - I can't find any reason or anything special about this class that would cause this. This is just a regular web form page with code behind class, in the default project namespace. I searched the whole project for the class name and it only comes back with the one place on the website where it resides, no duplicates from what I can see in the project.
Are web deployment projects compatible with web application projects? I upgraded my old website project type to web application, so not sure if web deployment project still valid?
Cheers