But I Only Want One File!

Technorati Tags: ,

Use ILMerge to combine a single exe and multiple dlls into a single new exe. You can also combine many dlls into a single dll.

Look for ILMerge from Microsoft Research on the web. You’ll need to download their tool to do this.

One .EXE

This was originally driven by a personal need where I wanted to have a single .exe file I could send someone. However, I had my .exe, one of my .dlls, and a third party dll. I could have easily copied my code from my .dll into my .exe, but what about the third party? I was still stuck with 2 files.

Here is the before picture:

image

By running this command I was able to combine them.

ilmerge /out:bin\Release\KarlZSecureFile.exe bin\Release\FileZSecure.exe bin\Release\FileZ.dll bin\Release\Ionic.Zip.dll

And the after:

image

So now I can just give the person the one KarlZSecureFile.exe program as a single file with no install!

I thought it was pretty cool.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.