Lets say, we have solution with 2 projects: A & B. A - is an executable-assembly, B - is a library-assembly. Both depends on some 3rd-party dll, say, 3rdParty.dll.
So we have dependencies:
B refers 3rdParty.dll.
A refers B & 3rdParty.dll.
We want to ILMerge B with its dependencies (in this case the only - 3rdParty.dll) into single dll - say, MergedB.dll.
Question: A.exe uses its dependency B from MergedB.dll. But can A.exe also use 3rdParty.dll from within MergedB.dll? If it can, how can we achieve it? My attempts for now fails with something like:
System.IO.FileNotFoundException: Could not load file or assembly '3rdParty, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0123456789abcdef' or one of its dependencies. The system cannot find the file specified.
I guess, it's impossible to refer some ILMerge'ed assembly (except the primary one - in this case B). But I can't find confirmation of this guess.