- Posted by miketeye on May 4, 2007
Share on FacebookI had an error recently which took me a while to figure out and fix, so I thought I would document it here to save someone in a similar situation.
Basically, if you ever have the need to upgrade an ASP.Net 1.1 web application to .Net 2.0 without a full scale redesign of the membership system, ie. user databases, roles etc, then you might have to resort to web application projects as a quick upgrade option.
I found myself in that situation recently while upgrading a .Net 1.1 app based on the IbuySpy portal to .Net 2.0. I went through all the steps necessary to migrate the app from ASP.Net 1.1 to a .Net 2.0 web application project. I was using Visual Studio 2005 with web application projects and web deployment projects. (This article is not meant to explain either of these tools, simply the error above)
When I tried to build the solution to produce the deployment files and a single assembly, the asp.net compiler compiled successfully, but the Ilmerge utility supposed to combine the assemblies into one kept throwing out with an exit code 1 and a message similar to "target assembly references itself". I searched the web and tried setting verbosity to diagnostic in tools/options with no explanation as to the source of the error.
Finally, the solution was to rename the combined assembly in the web deployment project differently from the output assembly name in project properties. With this fix, two dlls get generated in the bin folder of the web deployment project output directory, discard the dll with the name equal to the web deployment project target assembly and use the dll with name equal to that specified in the actual project properties.
Well that's it, I had to rush this, but I hope it makes sense, granting you know what you are doing. Hope it helps you out and saves you some minutes!!