question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error out properly when building WPF on ARM64 app until support is added.

See original GitHub issue

In #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:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hoyosjscommented, May 14, 2020

This issue was opened per my recommendation, which is this: Even if this is only a temporary situation, make it an error to attempt publishing UseWpf=true when RID=win-arm64.

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 bits

1reaction
dsplaistedcommented, May 14, 2020

I’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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found