Posts
203
Comments
1117
Trackbacks
51
July 2006 Entries
Error MSB6006: "aspnet_merge.exe" exited with code 1 - Web Deployment Project

This error often rears its ugly head when compiling an ASP.NET 2.0 Web Deployment Project.  At first glance, it is extremely difficult to troubleshoot because there is not much information along with the error.  In order to troubleshoot this, you need to use a higher level of verbosity.  If you're using MSBuild from the command line you can use the /verbosity switch like this (and then look at Output window for build):

C:\projects>msbuild YourSolutionFile.sln /t:Rebuild /p:Configuration=Release /verbosity:detailed

If you're using Visual Studio, then you can set Tools - Options like this:

Typically the problem is that when aspnet_merge merges the entire web project into a single assembly, you might find naming collisions.  By default, asp.net 2005 web site applications do not put a default namespace in the class files so if you create MyPage.aspx in the root and also in a sub-folder, this would causes a conflict when merged into a single assembly for the Release build.  This problem would not manifest itself during development because you're not pre-compiling the entire web site into a single DLL so there are several DLLs that make up the web project and naming collisions are avoided.  To fix the problem you can obviously either rename one of the classes or provide a namespace to avoid the conflict.

Posted On Monday, July 31, 2006 6:47 PM | Comments (50)

View Steve Michelotti's profile on LinkedIn

profile for Steve Michelotti at Stack Overflow, Q&A for professional and enthusiast programmers




Google My Blog

Tag Cloud