Error out properly when building WPF on ARM64 app until support is added.
See original GitHub issueIn #7457 we added support for WinForms apps targeting Windows ARM64, but not WPF. A RID specific build/publish fails appropriately if UsingWpf
is set (it claims that the WPF pack is not a valid framework reference). However, a RID agnostic WPF app successfully builds (be it on the ARM64 device itself or on a crossbuild), but will fail at runtime on ARM64. The shared framework on ARM64 doesn’t have the WPF bits and will end up throwing a FileNotFound
exception.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Port applications to Windows on Arm
This section shows how to port a Windows .NET 6 Windows Presentation Foundation (WPF) application to a Windows on Arm (WoA) application.
Read more >Compiling .NET Core for Windows 10 ARM64
To make this work with Windows ARM64, find the $Architecture line and modify the ValidateSet attribute above it to add , 'arm64' to...
Read more >Visual Studio on ARM powered devices
In this article. Get started with Arm64 Visual Studio; Installing Arm64 Visual Studio; Supported workloads; Visual Studio versions before ...
Read more >Unable to initialize .net WPF Runtime/Maps SDK 200...
Solved: I have a working WPF application and deployment that is currently on .net framework 4.8 / ArcGIS Runtime 100.15.
Read more >Is Maui dead on arrival? : r/dotnet
I am a WPF developer and since Microsoft basically killed WPF (not releasing any newer versions of it, not putting any more resources...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This fails properly as you said with
UseWpf
:dotnet publish -r -win-arm64
This doesn’t:dotnet publish
on arm64 or cross compile and marshal bitsI’m not sure we should do anything in the SDK for this. There can be a difference between the architecture you are building on and the one that you will run on. You could build a runtime dependent WPF app on an x64 machine, and it would work on that machine but fail to run on an ARM machine. You could build the same app on an ARM machine, and the output should be the same- ie it would fail to run on the ARM machine but would run if you copied it over to an x64 machine.
We could add a warning when building a WPF app on an ARM64 machine, but if we’re eventually going to support WPF on ARM64 anyway, it may be OK to just leave the current behavior.