ILMerge is an application developed by Microsoft Research that allows multiple assemblies to be combined into a single assembly. Many applications reference multiple assemblies and in order to install them every assembly must be copied on to the user's machine.
The number of files installed can be reduced by using the post-build events and ILMerge in Visual Studio to merge all of the assemblies into the executable.
For Smuggly I moved some functionality into other libraries to be used in other projects. After I did this the screen saver required several DLLs to be installed. This was a problem because I didn't want to clutter the user's system directory with a lot of file required by Smuggly.
I created the following post-build event to merge the DLLs that Smuggly depends on into the executable and then create a screen saver file which is the only file installed in the user's system directory.
copy "$(TargetPath)" "$(TargetPath).temp.exe"
ilmerge /t:winexe /out:"$(TargetPath)" "$(TargetPath).temp.exe" "$(TargetDir)FortAwesomeUILib.dll" "$(TargetDir)FortAwesomeUtil.dll"
copy "$(TargetPath)" "$(TargetDir)$(ProjectName).scr"
Special thanks to Shawn for originally introducing me to ILMerge many years ago.