I read this guide for .net native, but I can't found 'Enable for .net native' in popup menu. Should I install some extra plugin for VS2015 for compile with .net native?
相关问题
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
- javah not able to find android classes
- Bulk update SQL Server C#
To install the Windows 10 SDK which includes the .NET debugging tools.
Go here and download the SDK.
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
Open the MSI and Pick your tool sets.
.NET Native only works for Windows Store apps currently, you must make sure you chose a windows store app when you created the project for the option to be available.
From the .NET Native FAQ
[
This is the Project + Properties, Build tab of a project that was created with one of the Project > New > Visual C# > Windows > Universal project templates. Your machine must boot Windows 10, you may need to download the SDK separately if you installed VS2015 before Win10. Red arrows indicate the important parts, it should only be enabled for the Release configuration. The Platform setting matters as well, you need to test this for all platforms you wish to support (ARM, x86, x64).
Emphasis on the word
test
. The only reason you have the .NET Native toolchain on your machine is to verify that your app still operates correctly after the Store server recompiles the package you submitted. It is rather imperfect and cannot handle every possible Universal app. Several pain points, the major one is Reflection. The toolchain cannot see any types you load with reflection so cannot know that these types need to be converted to native code as well. Your app will fail miserably on the user's machine if this isn't taken care of.Testing is simply a matter of running the Release build of your program through its paces, verifying that everything still works correctly. Start with the x86 platform first. You can cut a few corners when you next test x64 and ARM.
The package you actually submit to the Store is the one that is not built with .NET Native. Microsoft wants to keep the option open to improve the toolchain so needs the MSIL version of your assemblies. Version numbering matters, the last digit is reserved for the store. They'll increment it when they rebuild your app.
In case it wasn't clear yet: the .NET Native toolchain is only available for Universal apps that are distributed through the Store. Maybe it will be usable some day on regular apps but that day is far off, a fundamental different way to package such apps will have to come first.