How to wrap multiple dll in a single dll [duplicat

2019-02-15 02:39发布

问题:

Possible Duplicate:
Merging .net managed dlls

I create a test project in which I referenced a dll from some other project. When I build my test project, I see different dll for test project and the referenced dll. I want to wrap both dll's in a single dll.

How can I do it.

回答1:

Take a look at ILMerge:

http://www.microsoft.com/downloads/en/details.aspx?familyid=22914587-b4ad-4eae-87cf-b14ae6a939b0&displaylang=en

http://www.codeproject.com/KB/dotnet/mergingassemblies.aspx

With ILMerge you can merge a bunch of assemblies by running the command like:

ilmerge /out:MergedAssembly.dll ProjectAssembly1.dll ProjectAssembly2.dll ProjectAssembly3.dll

This will merge 3 assemblies into a single one.