NinethSense oWnZ mE!: Praveen’s drawing book

Choose a Topic:

Fri
20
Jan '06

Merge an .exe and a .dll into one .exe

ILMerge is a utility for merging multiple .NET assemblies into a single .NET assembly. It works on executables and DLLs alike and comes with several options for controlling the processing and format of the output.
Visual Studio .NET doesn’t offer this (a linker). Luckily, at the Microsoft Research Download Page there is a free tool called ILMerge which does just this.
Download -> http://www.microsoft.com/downloads/details.aspx?FamilyID=22914587-b4ad-4eae-87cf-b14ae6a939b0&displaylang=en
Microsoft Research Page -> http://research.microsoft.com/%7Embarnett/ilmerge.aspx
Usage:
* put “ILMerge.exe” in your \WINNT directory
* In VS.NET, right click project, Properties, Common Properties, Build Events
* In “Post-build Event Command Line” enter:
ilmerge /out:$(TargetDir)YOURAPPNAME.exe $(TargetPath) $(TargetDir)YOURDLLNAME.dll
* Then compile the Release version (not the debug version).
* In your “bin\Release” directory, you will find a YOURAPPNAME.exe which can be run on its own without the .dll. (http://www.developerfusion.co.uk/show/4504/)
The CodeProject Microsoft Developer Network Official ASP.NET Forums Microsoft .NET Framework Community Microsoft Most Valuable Professional Kidoos forums Microsoft Visual Studio Developer Home Professional Information Technology Solutions Microsoft Research Home Kerala Microsoft Users Group Community Website