this question is relate to ILMerge and how to handle some specific case I'm facing. The issue is relevant for a bigger project, with many DLLs, but it is simple to summarize with a example:
The project has some files: MultiDLLPrj.exe DLL1.dll DLL2.dll DLL3.dll
MultiDLLPrj.exe has references to all of the other DLLs. DLL3 has a reference to DLL2.
Using ILMerge, my target is to merge MultiDLLPrj.exe + DLL1.dll + DLL2.dll, leaving out DLL3.dll.
Here comes the issue: ILMerge megres the give assemblies correctly, leaves out correctly DLL3.dll, which is copied in the same folder as the merged MultiDLLPrj.exe, but the proces execution is broken by the fact that DLL3.dll, when loaded, can't fine DLL2.dll (it has been merged in MultiDLLPrj.exe).
The command line used is: .\ILMerge.exe /lib:.\ /targetplatform:v4,C:\Windows\Microsoft.NET\Framework64\v4.0.30319 /log /out:.\bin\output.exe MultiDLLPrj.exe .\DLL1.dll .\DLL2.dll /target:exe
Now, apart from the obvious issue of the corss-reference, is there any way to make this to work, or the basic "design" is simply incompatible with the ILmerge approach?