Is it possible to include the necessary . NET to run a standalone application?

Asked

Viewed 80 times

3

The title may be confusing, but the goal is to make an application written with . NET run without the . NET Framework. In practice this is almost impossible because the application depends on the . NET libraries to run, but in my theory, merge the . NET Framework together the executable will make it independent of . NET, having all its libraries within the executable itself.

The merge would not be to insert all . NET Framework libraries into the executable, but only those that the executable depends on.

That’s possible?

1 answer

3


It is possible to use the .NET Core. It’s also possible as Mono, but this is becoming less and less necessary.

The . NET Core has some limitations yet. By 2019 you will no longer have most of them and you will be able to port your entire application to it. But today most of it can be ported. Some things can never be ported, but anyway are things that should not use anyway, are resources considered problematic and obsolete.

The . NET Core is self-contained and does not depend on anything previously installed. You mount the executable only with what you need. It still needs at least one DLL in addition to the executable. To have 100% native executable and no DLL would need the .NET Native, but for now only serves for a specific type of application.

If it depends on the . NET Framework full has nothing to do. And actually if you already have the . NET suitable in the machine or need because everything is already there.

Anyway . NET Framework will be legacy. Will be supporting, will evolve, but very slowly, and only what is easy and necessary. Core is the future for almost everything, especially new projects.

  • So . NET Core creates a . NET executable with its libraries next to the executable or inside the executable? Something else, if the . NET is included in the output, the . NET Core executable can be converted to a Windows executable (without . NET)?

  • 1

    I improved the answer.

  • 1

    @Cypherpotato the world . NET is quite different from the native world. The executable of . NET can only be converted to a Windows executable (without .NET) through . NET Native, which is very strict and specific but when using . NET Core and make a deploy as self-sufficient, your app goes with everything you need to run (without relying on installing .NET on the computer). But no, it’s not native.

Browser other questions tagged

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