Steve Holstad's "the bright lights"

"Just because your voice reaches halfway around the world doesn't mean you are wiser than when it reached only to the end of the bar." - Edward R. Murrow
in

web deployment project vs2005 (exit code 1)

In our latest build using Visual Studio 2005 Web Deployment Projects, we were seeing the build fail with the following error:  aspnet_merge.exe exited with code 1.  Not the most helpful error text.

The fix is relatively easy, however.  Select Tools --> Options.  Then in the Projects and Solutions branch, select Build and Run.  You'll see a dropdown box for MSBuild Project Build Output Verbosity.  Change this to Diagnostic, and OK.

Then show your build output by selecting the View --> Output option.  Make sure that in the 'Show output from' box, you've selected "Build".  Then just build your project, and wait for the inevitable fail.  You should see something like:

An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type 'OurAssembly.Login' found in assembly 'App_Web_9wlv1iu2'.
C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\Microsoft.WebDeployment.targets(574,9): error MSB6006: "aspnet_merge.exe" exited with code 1.
Done executing task "AspNetMerge" -- FAILED
.

Then adjust your class names to eliminate the duplicate class name(s), save and rebuild.

Comments

Craig Martin said:

Very useful. Thanks so much for posting this as it saved me pulling the rest of the hair out of my head!

Cheers,
Craig
# March 30, 2006 9:49 AM

Dmitry said:

This helped us find the problem, thank you
# April 18, 2006 2:43 PM

Scott said:

Excellent post. Solved my problem.
# April 18, 2006 10:34 PM

mlcy said:

yup, big help.
# April 21, 2006 2:46 PM