Reputation: 14306
I have a dll project which uses some third party dlls. I would like the compilation result to be just one big dll with all the third party dlls included in it. How can I do this in Visual Studio 2010?
Upvotes: 2
Views: 4700
Reputation: 31723
ILMerge is a .NET only solution (does not work for unmanaged dlls)
A nice tool is NETZ (.net executable compresser and packer) which compresses all your dependencies in a single exe / dll file.
I have not used it recently so I can't tell if it is compatible with .NET 4.0 And it didn't get many updates in a while but I would give it a try.
Upvotes: 0
Reputation: 3717
There are several approaches that you can take here to achieve this. Here are a couple:
You could include the source, if available in one project, and then compile it to a single binary.
You can add the external assemblies as resources, and load them dynamically at runtime.
You can use something like Eazfuscator.Net, which uses ILMerge to merge assemblies at compile time. (can also use ILMerge directly, but Eazfuscator has nice wrapper features) Eazfuscator .Net
Upvotes: -1
Reputation: 64487
You need to use ILMerge, assuming the DLLs are all managed:
http://www.microsoft.com/en-us/download/details.aspx?id=17630
And some related questions:
Upvotes: 3