Reputation: 1033
For past few days, I had been struggling with Merging assemblies inside a single executable file. So that I can distribute the single executable file to my users. I found out ILMerge
to do this apart from ILMerge
, there are few more tools that seem to do it. I tried BoxedAPP
Packer and SmartAssembly
also .NetShrink
seems to work good but all are paid tools. So, I wanted to complete the task with ILMerge
and after much of browsing and searching Google and from StackOverflow, I found out the solution.
I tried the below set of lines for merging the assembly
c:\"Program Files"\Microsoft\ILMerge\ILMerge.exe"
/lib:"C:\Windows\Microsoft.NET\Framework\v3.5"
/lib:"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies"
/t: winexe
/target:exe
/targetplatform:v3.5,C:\Windows\Microsoft.NET\Framework\v3.5
/out:”MergedProduct.exe”
"$(TargetDir)Product.exe"
"$(TargetDir)CButtonLib.dll"
"$(TargetDir)Common Tools.dll'
"$(TargetDir)Core.dll"
"$(TargetDir)ProgressIndicator.dll"
"$(TargetDir)TaskScheduler.dll"
I used this above set of lines inside Build-Events > Post-Build event command line
and after building the project I got as build succeeded. Also while building the application runs as if i have pressed F5 to start debugging. So, to summarize up, I'm sure the above set of lines are correct but i couldn't find the output executable file (i.e MergedProduct.exe
) anywhere. I also tried using the Release
mode of the Visual Studio 9.0 but still i couldn't find the Output merged executable.
Is there something really obvious that i'm missing?
Also, can I merge Product.exe.config
file using ILMerge
?
Any help or suggestions would be really appreciated.
Upvotes: 0
Views: 1833
Reputation: 5144
Is that codeblock a cut and past of the command line? I notice you have fancy quotes around the /out filename. Also, have you tried adding a folder to the /out filename (eg, $(TargetDir))? We do that in our build process to save it in a particular publish folder.
ILMerge will allow you to merge the xml documentation, but not the configuration files (as far as I'm aware).
Upvotes: 1