How to create a monolithic application executable. NET?

Asked

Viewed 326 times

6

I wouldn’t want to do the deploy from the full DLL application, wanted something simple, no installer, wanted to generate only one executable file, but the . NET is all DLL-based.

You can generate a single executable?

1 answer

6


Same monolithic executable with only the .NET Native. Either Mono or now with . NET 5 using Runtime mono.

With . NET Core it’s easy to generate a single executable, but you’ll still need the Runtime separate, at least reduces to a single DLL. And does not need to have the . NET Framework installed.

More recently no. NET Core can pack everything in a single file, though not a single executable. For most scenarios this already solves what you want.

If it is a standard application. NET Framework can use ilmerge that is made to join everything in a single file.

But if you have unmanaged DLL, in C or C++, for example, then it doesn’t work. The only way is to add the DLL as a resource and make the separation before the execution, at least you ensure that the transport to the deploy will ok and if user ends up deleting accidentally you can restore from main executable. The most that can do is to pack everything in one file, but will be several internal files within this.

Some people prefer to manually make even managed Dlls.

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.