ILMerge for creating distribution DLLs.

ILMerge is a tool available for download at
http://www.microsoft.com/downloads/details.aspx?FamilyID=22914587-b4ad-4eae-87cf-b14ae6a939b0&displaylang=en

One use of the tool is described at http://jasonhaley.com/blog/archive/2007/04/05/138404.aspx
The basic sequence (as outlined in the article):

ILMerge WinJournal.exe WinJournal.Register.dll /out:WinJournal2.exe
(Any number of sources can be specified.)

ildasm WinJournal2.exe /source /out:WinJournal2.il
(This breaks the exe into IL code.)

ilasm WinJournal2.il /debug /out:WinJournal21.exe
(This puts the pieces back together in an exe and builds a PDB debugging file at the same time.) (Note: resource files may be created during the prior step and need recombining as well.)

This is especially useful for creating a debuggable assembly that is easy to deploy (ensuring that all the components of the assembly are matched in version and only a couple of files to move instead of a directory full of loose DLLs).

Category: