There is a point to this story, but it has temporarily escaped my mind...
Contact Me MyFaceBook MyLinkedIn MyGitHub MyTwitter

Merging .Net Assemblies into a .DLL/.EXE with ILMerge

Sometimes when I am working on project that have third-party libraries, I want to combine the assembly to ease deployment and to make sure all dependent libraries are available with my application or library. Sometimes I just want to deploy a single file via xcopy. Luckily, ILMerge allows me to merge multiple .NET assesemblies into a single DLL or EXE.

Merging into a DLL

ilmerge.exe /target:library /out:bothassemblies.dll assembly1.dll assembly2.dll

Merging into an EXE

ilmerge.exe /target:winexe /out:bothassemblies.exe assembly1.exe assembly2.dll

Download ILMerge.

Copyright © 2022 by Julian Easterling. SOME RIGHTS RESERVED.
Privacy Policy              Terms of Use             

Creative Commons License
Except where otherwise noted, content on this site is
licensed under a Creative Common Attribution-Share Alike 4.0 International License.

All of the opinions expressed on this website are those of Julian Easterling and
do not represent the views of any of my current and previous clients or employers in any way.

If you notice an error on the site or content that has not been properly attributed, bring
it to my attention using the contact page and I will endeavor to fix it as soon as I can.

I accept no responsibility or liability for any damages incurred by following any of
my advice or by using any of the information on my site or of those sites that I link to.