How to create a monolithic executable from the .NET application?

6

I would not like to deploy the application full of DLL, I wanted something simple, without installer, I wanted to generate a single executable file, but .NET is all based on DLL.

Can you generate a single executable?

    
asked by anonymous 27.03.2017 / 14:04

1 answer

6

Monolithic executable even only with .NET Native .

With .NET Core it's easy to generate a single executable, but you still need separate runtime , at least reduce to a single DLL. And you do not need to have the .NET Framework installed.

If it is a normal .NET Framework application, you can use ilmerge which is meant to put everything together into one file.

But if you have an unmanaged DLL, in C or C ++, for example, it does not work there. The only way is to add the DLL as a resource and do the separation before execution, at least you guarantee that the transport to the deploy will go ok and if the user finishes deleting accidentally you can restore the main executable.

Some people prefer to manually do even managed DLLs.

Others prefer other more complete utilities. Perhaps the most popular example is the Fody Costura , which alias is part of a rather interesting utility. Other:

27.03.2017 / 14:15