3

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.

2 Answers 2

3

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.

9
  • Soga, but I still find some way to improve performance. I ask this question for taking one's chance.
    – lindexi
    Oct 19, 2017 at 1:10
  • For .net 4.5.1 is published in 2014 and today is 2017 that I think Microsoft may use some black technology to compile the app with .net native.
    – lindexi
    Oct 19, 2017 at 1:13
  • All you need to do is give Microsoft more money. The more money you give, the greater chances that .NET Native will enter into WPF. This is a joke, but also a reality. WPF's input-output ratio is very small and it's the case at least for Microsoft.
    – walterlv
    Oct 19, 2017 at 7:39
  • "black technology to compile the app with .net native"? No. .NET native applies only to UWP.
    – mm8
    Oct 19, 2017 at 13:35
  • @mm8 .Net native can apply to windows store app.
    – lindexi
    Oct 23, 2017 at 12:04
2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.