I have main assembly MyAssembly.dll and a lot of libraries which I want to merge into main assembly. Because there are lots of them, I wanted to include them all using wildcard, something like this:
ILMerge.exe /wildcard /allowDup /out:MyAssembly.Merged.dll MyAssembly.dll *.dll
The problem with this approach is that it merges MyAssembly.dll twice, resulting in duplicated type names, so need to use /allowDup option. But this option renames duplicated types, and I don't want that (my DLL is a plugin for other application and all types must have original names).
I could omit MyAssembly.dll in command line, but because ILMerge merges assemblies alphabetically, it treats the first one as a main assembly (for example Autofac.dll) which results in final assembly having wrong metadata (version etc.).
Is it possible to exclude certain assembly name with wildcard option?