Thursday, December 21, 2006

Diagnosing "aspnet_merge.exe exited with code 1” error in Web Deployment Projects

For those that have problems with Error 24 "aspnet_merge.exe" exited with code 1.

The error is related to a duplicate class name in your web project, i.e. two files which have the same name, generally in different directories.

Those files could be hard to find and the following is a quick way to isolate the problem and find the duplicate names.

In Visual Studio 2005:

  • 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.
  • 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 will see where the duplicates are when it fails to build.

This tip has been posted by Simon Morgan on


Anonymous said...

Thx a lot.

Anonymous said...

Excellent post

Anonymous said...

Thanks for the solution.

Anonymous said...

Brilliant !!

Anonymous said...

You are a STAR !!!

CY said...

Thanks for that.