Welcome, Guest
Username: Password: Remember me
Share your code snippets, screen shots etc. here
  • Page:
  • 1

TOPIC: How to link in one exe file

How to link in one exe file 1 year 8 months ago #2876

  Frank Maraite's Avatar Topic Author Frank Maraite Offline Posts: 172
Hi all,

some people, Horst for example, like to deliver only one exe file instead of a bunch of dll's.

There is a little program that does this for us: ILMerge. I use it in a little batch file MergeMyProgram.bat that contains:
del YourApp.LOG
"C:\Program Files (x86)\Microsoft\ILMerge\ilmerge" /allowdup /out:"D:\OutputPath\YourApp.exe" "YourApp.exe" "YourAssemblyOne.dll" "YourAssemblyTwo.dll"  /log:YourApp.LOG /targetplatform:v4,C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319

These are only two lines! All options must be in one line.

This works not always. For example it does not work if WPF is involved. I don't no why. But for CGI programs (Horst) this could be a possible way to avoid putting all assemblies in the GAC.

If you search for 'ilmerge alternative' you will find additional information, for example this one:

and this


Please Log in or Create an account to join the conversation.

Last edit: by Frank Maraite. Reason: typo
  • Page:
  • 1