Creating a single executable from multiple .NET assemblies

Problem
You have a .NET application that uses multiple assemblies but you want it as a single executable.

Solution
Use ILMerge to merge the assemblies into one executable.

Solution (with WPF support)
Embed the required assemblies as embedded resources in your project and extend the assembly resolving to check the embedded resources (see second link for details).

Hint
If you build an executable that contains something like a common namespace, that is also used in other applications, and the other applications also reference the single executable there will be a namespace clash. To avoid this you can use the /internalize parameter of ILMerge (see first link for details).

Links

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.