I have 3 projects:
- A_MainProject (startup project)
- B_IntermediateProject
- C_SharedClassLibrary
The depencies are:
A depends on B & C
B depends on C
and C depends on System only.
Every Project has it's own namespace.
As long as no ILMerge is installed, everything works fine.
If ILMerge is activated for Project A ("A_MainProject") everything still works fine and one self-contained executable for Project A is generated.
If ILMerge is now also activated for the B_IntermediateProject, I get the following error:
Error 2 The type 'C_SharedClassLibrary.SharedClass' exists in both 'c:\dev\ILMergeError\B_IntermediateProject\bin\Debug\B_IntermediateProject.exe' and 'c:\dev\ILMergeError\C_SharedClassLibrary\bin\Debug\C_SharedClassLibrary.dll' C:\dev\ILMergeError\A_MainProject\Program.cs 12 A_MainProject
I use "MSBuild ILMerge task" 1.0.3-rc2 with "ILMerge" 2.13.0307 (from mbarnett).
The minimal solution contains 3 Projects with one class each. This version has ILMerge activated on only one project and works:
ILMergeError_stillworking.zip
This version has it also activated on project B and produces the error:
ILMergeError_error.zip
If I merge the two exes and the dll with ILMerge externally (ILMergeGUI) everything works fine.
Thank you in advance for answering, Xan-Kun