I'm looking for a solution how to turn a bunch of dll's into one and LibZ seem so far as the most elegant solution, but I can't make it work somehow:(. I'm creating a sort of "plugin" dll for a master application, where I don't want to involve additional
references and all I want to create is a standalone DLL at most with a few dependencies that the master program includes anyway (System.Core, System.Xml, ...).
I tried to create a standalone project DebugToy to demonstrate the behavior I'm stuck at with linking additional log4net.dll. After building the dll the references in ILSpy show as:
Now I run this command to inject the log4net library:
libz inject-dll --assembly DebugToy.dll --include=log4net.dll --move
And this is what I get (the reference to log4net still remains, though it seems that it's dependencies are no more displayed in the tree):
Anyway the final DLL fails to load in the master application and cries for missing log4net dependency:(.
What I would expect is that the log4net reference would disappear and it's dependencies would be added. I'd like to know if I'm missing something or if there's some feature with transitive referenced libraries or why it doesn't work. Should I inject dll's in
some order so that the latter injected dll's already see that their referenced libraries are already injected? I'm not able to figure this out:(
Thank you so much.