mkdir "$(TargetDir)Merged" "$(SolutionDir)ILMerge/ilmerge.exe" /keyfile:"$(ProjectDir)key.snk" /target:library /copyattrs /targetplatform:v4,"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /out:"$(TargetDir)Merged\$(TargetFileName)" "$(TargetDir)$(TargetFileName)" "$(TargetDir)Microsoft.Web.Services2.dll" /lib:"$(ProjectDir)bin\debug" del "$(TargetDir)$(TargetFileName)" /Q move "$(TargetDir)Merged\*.*" "$(TargetDir)"
Of course to use it you have to point script to ILMerge executable, your strong name file and add assemblies you’ve used.