Ilmerge Task

tkellogg edited this page Feb 15, 2012 · 1 revision

ILMerge is a utility from Microsoft Research for merging multiple .NET assemblies into a single .NET assembly. It takes a list of two or more assemblies and outputs a single, merged, assembly.


This example uses an ILMerge assembly that is located in tools/ILMerge/ILMerge.exe to merge assembly1.dll and assembly2.dll into a single master.dll (for distribution).

ilmerge :merge do |cfg|
  cfg.command = 'tools\ILMerge\ILMerge.exe'  # optional, if you have it installed within the repository
  cfg.assemblies 'build/assembly1.dll', 'build/assembly2.dll'
  cfg.output = 'build/master.dll'


  • assemblies - a list of all input assemblies, including path
  • output - the name of the resulting assembly, including path