Skip to content
</> Mücahit TopalA developer's notebook

Blog/C#

Merging an Exe and a DLL with IL Merge

Mücahit Topal 1 min read 4,830 views TREN

With the IL Merge program released by Microsoft, you can merge an exe and a dll file written in one of the .Net languages.

First, download the IL Merge program:
http://www.microsoft.com/en-us/download/details.aspx?id=17630

Install the program from the setup file. (ILMerge.msi)

Create a file with the .bat extension in the directory where your exe and dll files are, and put this in it:
ilmerge.exe /target:winexe /out:yeni_program.exe program.exe library.dll

Adjust the command to suit yourself: write the name of your own exe instead of program.exe, the name of your own dll instead of library.dll, and the name you want the resulting exe to have instead of yeni_program.exe.

When you run the batch file, the new exe will be waiting for you.

If you get a command not found error, copy the C:Program FilesMicrosoftILMergeILMerge.exe file into the program's directory.

*Because of the merge operation, some antivirus programs may flag your program as suspicious.

,,,,

Share X Facebook LinkedIn WhatsApp

More from this category

Comments 0

No comments yet.

Leave a comment

Comments appear after approval.