The step is as follows:
- Download ILMerge from microsoft site here.
- Install and copy the ilmerge.exe to windows directory or simply make the PATH to installation directory (to let us execute ilmerge.exe from anywhere)
- Go to the project properties, Build Events. Assuming the dll files are in the same directory of the Target, enter the following code to the post built even command line:
ilmerge /wildcards /out:$(TargetDir)my-final-app.exe $(TargetPath) $(TargetDir)*.dll
To have a better understanding on how to execute ilmerge, I suggest to read the ilmerge.doc which is located in the installation folder.
That's all :)