I\'m trying something exploratory:
Say I have a library \"coolproject\" and it has dependencies to one.dll
, two.dll
, and three.dll
The reason this does not work ended up being rather simple: ILMerge must be able to locate the dll that you have omitted from the list.
When evaluating dependencies in the target library, ILMerge by default checks various locations to identify the dependent library (\bin, GAC, etc) even if you omitted it from the command line list. If it cannot locate this library you must specify its location using the \lib
switch. Otherwise you will see the Unresolved assembly reference not allowed: three
error.
Example:
ILMerge /lib:..\three\bin\three.dll /targetplatform:v2 /log /internalize /out:bin\coolproject.dll obj\Debug\coolproject.dll C:\Users\Nick\Projects\test\bin\one.dll C:\Users\Nick\Projects\test\bin\two.dll