Can we compile an asp.net 5 application using .net native?

The .net native role in the .net ecosystem is confusing to me. I heard that these are just universal Windows applications, but also heard that it is part of CoreFX. I think that compiling in .net native can have many advantages (including performance).

Can I compile my asp.net application (specifically asp.net 5) into .net native?

+5
source share
2 answers

No, you can’t. Right now, .NET Native is not for ASP.NET. I believe this is for universal Windows applications only. This does not mean that one day it will be unavailable, but now it is not planned.

See the related GitHub issue where the ASP.NET team confirms this.

Edit 11/27/2015

Since this was published, Microsoft made additional announcements regarding .NET Native and .NET Core. I suggest you check out Scott Hanselman’s part of the keynote at the Microsoft Connect 2015 event. At 11:22 minutes, this Scott retrieval video shows the compilation of the .NET application into its own code, and then its launch. He says this is “future work,” so it seems he’s not quite ready yet (I believe one of the Q&A video from the event explained that he is in one of the dev branches on GitHub, but I'm too lazy to reinstall all the videos for you at the moment). It was unclear whether this only works for console applications at the moment or whether ASP.NET will be launched.

+5
source

As Thomas says in the comments, this should be possible after LLILC . It targets .NET Core, which runs ASP.NET 5. I'm not sure if the resulting runtime can be called .NET Native for everyone, but LLILC do have plans to initially compile IL (like the Roslyn release) ahead of the time.

Another option is ASP.NET running on CoreRT , using RyuJIT as an AOT compiler. Today it looks closer to reality than LLILC. We saw some experiments on compiling an ASP.NET project on CoreRT, but nothing works.

[.NET Native uses a UTC compiler that compiles to run on certain C ++ scripts (MRT is a minimal runtime environment or a managed runtime environment that may not be remembered, also known as Native runtime). Currently, .NET Native UWP applications are Windows specific. Although .NET Native and UWP are advertised in .NET Core, this can be misleading, since only in debug mode does UWP target CoreCLR, in release mode it focuses on native runtime, which depends on Windows. LLILC / CoreRT should change that.]

+2
source

All Articles