In Microsoft Build 2014 Conference, Microsoft has announced the first release of .NET Native. So what is this “.NET Native”?. In this post we are going to find out what.
In simple .NET Native is Microsoft's newest compiler or rather a pre compilation technology for building and deploying Windows Store apps. Typically, apps that target the .NET Framework are compiled to intermediate language (IL). At run time, the IL gets translated in to native code using the just-in-time (JIT) compiler or Native Image Generator (Ngen.exe). In contrast, .NET Native compiles Windows Store apps directly to native code.
In deep, .NET Native do more than just compiling Windows Store App to native code. It transforms the way that .NET Framework apps are built and executed. In particular:
- During precompilation, required portions of the .NET Framework are statically linked into your app. This allows the app to run with app-local libraries of the .NET Framework, and the compiler to perform global analysis to deliver performance wins. As a result, apps launch consistently faster even after .NET Framework updates.
- The .NET Native runtime is optimized for static precompilation and thus is able to offer superior performance. At the same time, it retains the core reflection features that developers find so productive.
- .NET Native uses the same back end as the C++ compiler, which is optimized for static precompilation scenarios.
.NET Native is able to bring the performance benefits of C++ to managed code developers because it uses the same or similar tools as C++ under the hood.
So at a glance what’s the benefit of using .NET Native. In simple .NET Native offers you the performance of C++ with the productivity of C#. Windows Store apps which are compiled with .NET Native start up to 60% faster with .NET Native and have a much smaller memory footprint.
Download the .NET Native Developer Preview 2 and try it out on your Windows Store apps. Make sure you have Visual Studio 2013 Update 2 installed as the .NET Native Developer Preview 2 installs on Visual Studio 2013 Update 2.
Read more about .NET Native,