• June 2011
    M T W T F S S
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  
  • Latest Posts

  • Latest Comments

  • Archives

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.

Leave a Comment