Monday, October 15, 2007


I just found out about this utility/possibility. Thought it was so interesting that I should make a note of it here: ILMerge. It can be used to take an executable and a dll it depends on and package them into a single executable.

ILMerge.exe /out:complete_app.exe app.exe app_lib.dll

I have one scenario where this is useful for me: I have a program that has both a console and gui (windows forms) front-end. In order not to duplicate code I have 3 project, one for the console part, one for the gui part and one for the common code. In a Wix installer script I need to reference both the gui project and the common dll, but by inserting the dll into the gui executable I only need to reference a single executable in the Wix script :)

True, a marginal improvement, but, still, many brooks make a river :)

No comments: