Creating an all-in-one .Net Executable

I discovered a nice utility that accompanies Visual Studio; at least it is in Visual Studio 2015. It is called ilmerge. It specific purposes is to fold an executable along with any dependent DLLs into a new executable that requires no external dependencies. You might need this for those time when you want a single executable on, say, a remote system.

Here is a command that binds two .Net libraries, one a distributed Microsoft API and the other is part of my program.


ilmerge /log:ilmerge.log `
/lib:C:\Windows\Microsoft.NET\Framework\v4.0.30319 `
/target:winexe /targetplatform:v4 `
/out:FreeBytesC.exe `
/ndebug FreeBytes.exe `
FreeBytes.exe FSharp.Core.dll VolLib.dll

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s