Reputation: 4327
I read this article that says .net framework 4.5.1 support to compile the app with .net native.
But I can't find any articles to tell me how to compile wpf with .net native.
I try open my sln in VisualStudio but I can't find any option to do it.
Can you give me some article to compile wpf with .net native.
Upvotes: 4
Views: 5194
Reputation: 4327
Now we can use Microsoft.DotNet.Framework.NativeImageCompiler to compile the .NET Framework(>4.6.2) with native image.
See Optimize your .NET desktop apps with native images - MSIX
The other way is update the project to dotnet core and then install the Microsoft.DotNet.ILCompiler nuget package which will compile to native when we publish
dotnet publish -r win-x64 -c release
Upvotes: 2
Reputation: 169150
I read this article that says .net framework 4.5.1 support to compile the app with .net native.
No, it doesn't. It says that "the .NET Framework content set now includes documentation for .NET Native" which is a totally different thing.
WPF and other types of "classic" desktop apps does not support .NET native because .NET Native applies to Universal Windows Platform (UWP) apps only. This hasn't changed and there is no .NET native support for classic desktop apps on the roadmap as far I know.
Upvotes: 3