Exploring Future Tools: Using .NET Native for Increasing Windows Store App Performance

Traditionally, C# and VB developers enjoy the comfort and productivity of desktop application development using the .NET Framework. The introduction of .NET on non-traditional devices, such as tablets, phones and IoT gadgets, added new vector for the Framework evolution – superior performance on low power devices.

The .NET Native technology is designed to bring the performance of native code to managed code developers. Instead of generating intermediate language code, .NET Native compiles C# applications directly to native code. In addition, it statically links parts of the .NET Framework with the application and optimizes the resulting package for performance.

According to Microsoft, “popular Windows Store apps start up to 60% faster and use 15-20% less memory when compiled with .NET Native.” Let us see how performance will improve for an average app.

Currently .NET Native is focused on Windows Store apps and is available as a preview. For the performance test, I will use one of my published Windows Store apps – Toronto CHEMTrack – and Visual Studio “14”.

How to enable .NET Native

Enabling of .NET Native for Windows Store app includes three steps:

1. AnyCPU configuration is not supported by native compiler, so x64, x86 or ARM architecture shall be used.


2. Enable .NET Native for the project.


This step triggers analysis of the project to verify that the code is compatible with .NET Native. It also creates “default.rd.xml” to inform .NET Native about important parts of metadata that should be retained during compilation. For simple cases, default configuration is enough for functioning properly.

3. Enable .NET Native compiler in the project properties


Compilation will take longer than before but the resulting app will be generated using .NET Native compiler.

Performance comparison

MSDN provides a great overview on measuring app startup performance. This method include use of EventSource to instrument the application:






And use of PerfView to monitor events:


Applied to Toronto CHEMTrack, with and without .NET Native, it generated six data points to analyze.


The following table demonstrates impressive performance improvement for application compiled using .NET Native:


Managed, ms

.NET Native, ms

Perf. improvement

App started




App initialization




MainPage initialization




MainPage load




Try It

Have you tried .NET Native with your apps yet? Leave a comment and let me know what your performance gain is. If not, after seeing the numbers above, I am hoping that you will give it a try.

Connect(); on November 12 and 13

clip_image001A cloud-first, mobile-first, developer-first, virtual event
Don’t miss Connect(); next week! Scott Guthrie, S. Somasegar, Brian Harry, and Scott Hanselman will take the stage to show innovative, new Microsoft products, services, and technologies including .NET, Azure, Visual Studio, and Visual Studio Online.

Dive deeper into the technical details behind the announcements with over 40 on-demand technical sessions. Interact with the Microsoft engineering teams in live sessions to get answers to your questions.
Come experience the new world of mobile-first, cloud-first development where you will build on your existing skills to unleash your creativity in the comfort of your office.

Check out the Connect(); for more details >>

Comments (2)

  1. Awesome, I want to see also, .NET Native for every applications .NET, this will be nice!

  2. @Roberto According to the .NET Native FAQ, Windows Store is a priority for now, but Microsoft may bring it to other platforms later.

Skip to main content