Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a .NET app be compiled to native?

Just wondering if a .NET app can be compiled down to native machine code ahead of time? I'm not planning on doing so even if I could; I'm just curious.

Thanks

like image 468
Nathan W Avatar asked Oct 10 '08 00:10

Nathan W


People also ask

Can C# compile to native?

It automatically compiles the release version of apps that are written in managed code (C# or Visual Basic) and that target the . NET Framework and Windows 10 to native code. Your apps will provide the superior performance of native code. You can continue to program in C# or Visual Basic.

Is .NET native code?

NET Native is a precompilation technology for building and deploying UWP apps. . NET Native is included with Visual Studio 2015 and later versions. It automatically compiles the release version of UWP apps that are written in managed code (C# or Visual Basic) to native code.

Does .NET have a compiler?

NET uses two compilers, Roslyn, to compile C# or VB code into CIL (common intermediate language), and RyuJIT, to run just-in-time compilation of CIL into native code. Both compilers are highly regarded by the . NET community as Microsoft actively improves them.


1 Answers

You can use NGen to compile it ahead of time, but this still depends on the .NET framework. Remotesoft's Salamander (a commercial app) can make a framework-less app.

like image 96
Serafina Brocious Avatar answered Sep 27 '22 19:09

Serafina Brocious