Being independent of . NET Framework is different from being independent of anything.
It is possible to create a native executable using C# or other standard language. NET with .NET Native. It is a set of tools that allows you to convert the CIL for native platform binary. Of course it has a library that acts as the Runtime of the language that is needed. By C# requirement this Runtime It can’t be that small, but it’s much smaller than the . NET Framework and can get all contained within the native executable itself *has some tricks that can be done, can make keep 4KB, but subvert what C really is#).
This requirement to have nothing else can only be met by Assembly in more or less C, yet doing something very basic. Understand how . NET works. You can reduce part of the infrastructure, but you can’t eliminate everything without making it impossible to be what it is, to give the security normally offered.
Nor can it function without several of the BCL classes. The language supports many of them and even those that are not directly dependent on the language are still used in most applications. Of course a self-contained executable need not have more than the code used, need not load all BCL or FCL. Same in every language. Even C depends on a library. I just can’t tell if it’s smart enough to separate what you use in each class or need to put it all, or even every compilation unit if it’s a Linker. There’s a case you can’t even risk eliminating certain things.
Of course some features can be compromised without the full platform. Reflection even is a little limited, but in native executable it has little use even.
Also has the LLILC using LLVM.
There are other ways to use the middle where you don’t need the . NET Framework installed on the machine, but it’s not enough to be a native executable either. Could be the .NET Core, the Mono, some models of Xamarin. In iOS Xamarin generates native code. All of them are independent of the . NET Framework or other platform that needs to be previously installed.
The . NET Framework is just one of the ways to serve C#, and is going into disuse, including . NET Native does not have much future, a pity.
Just to confirm: you want to create an executable, right? So the answer is yes. Just open the visual studio , create a new project , choose the windows template and then windows Forms Applications. From there is programming from there.
– Renato Afonso
Not exactly, want to create an application that does not depend on the . NET Framework to run.
– CypherPotato