Some time ago I blogged that my attempt to use VS 2005 Web Deployment Project failed with not very helpful Aspnet_merge.exe Exited With Code 1 message. As it is described in the thread, the actual error reported was
An error occurred when merging assemblies: ILMerge.Merge: ERROR!!: Duplicate type 'DotNetNuke.UI.Skins.Controls.SolPartMenu' found in assembly 'App_Web_k5hhsnh0'.
I found that there are 2 files “admin\Skins\solpartmenu.ascx“ and “admin\Skins\menu.ascx“ referring to the same SolPartMenu.ascx.vb. 2 files generated partial classes with the same name and caused “Duplicate type” error during merge.
I didn't find where “admin\Skins\menu.ascx“ is used, so I just excluded it from the project.
The recomendation how to fix the problem in general are described in MS article “Common Web Project Conversion Issues and Solutions”, issue 26.
After this I've got the next error “Duplicate type 'DotNetNuke.UI.WebControls.SolPartActions'” , that I fixed by excluding admin\Containers\actions.ascx from the project.
After this I was able to build Deployment project without any errors, that gave me one DLL per subfolder.
The problem is reported to DNN Support.