tsunami
log in
email
password
links
newest items
tag list
syntax reference
tag:time
history
item name
tags
==Summary Among other things, "`ilmerge`"[1] ("download"[2]) allows one to merge a _dll_ into an _exe_ so that instead of distributing two files and having the danger of `FileNotFoundException`s, things work simply. [1]http://www.google.com/url?sa=t&ct=res&cd=2&url=http%3A%2F%2Fresearch.microsoft.com%2F~mbarnett%2FILMerge.aspx&ei=zK_NR4SHG5Pkean3vBc&usg=AFQjCNHbbkxP_Xd04uo6_RvLivYHpkQiJw&sig2=cnAI-fzhWXYf9FrACziIHA [2]http://www.microsoft.com/downloads/details.aspx?FamilyID=22914587-B4AD-4EAE-87CF-B14AE6A939B0&displaylang=en ==Visual Studio "build events"[1] If you have the path to `ilmerge.exe` in your `"PATH"[2]` variable, the following build events should work. Otherwise, you'll need to include the full path to `ilmerge` in the post-build script below. =Notes - if `$(TargetPath)` has spaces in it, then the below needs to be properly "escaped"[3] - error messages arising from pre- and post-build events will show up in the output window (`Ctrl-W, O` for me) - using the VS debugger on a merged exe can fail in weird ways -- I have not fully characterized this [1]http://visualstudiohacks.com/customizeBuild [2]http://vlaurie.com/computers2/Articles/environment.htm [3]http://www.ss64.com/ntsyntax/esc.html =pre-build {{ del $(TargetDir)*.pdb }} (it's either VS or `ilmerge` that errors out if the .pdb file already exists) =post-build I am assuming the dll is `Mono.GetOptions.dll` here. {{ move $(TargetPath) $(TargetPath).bak REM it's important to use winexe if the exe is a windowed application, and exe if it is a console app ilmerge /target:exe /out:$(TargetPath) $(TargetPath).bak $(ProjectDir)Mono.GetOptions.dll del $(TargetPath).bak }}
some permissive license goes here
contact