Replies: 6 comments
-
Folks, |
Beta Was this translation helpful? Give feedback.
-
Hi @predavid some quick feedback for you. I'm trying to get up and running with WPF on Windows 10 ARM64, and am happy to provide feedback. I have had no success debugging a WPF application on ARM64 with .NET 6 Preview 1, either locally on an ARM64 device or using Remote Debug. I am able to "dotnet build" and "dotnet run" the WPF app using pure ARM64, but cannot debug it. My setup I did not install the x86 remote debug tools or the x86 version of the .NET 6 SDK Preview on the Surface Pro X. Question For reference, here are all the things I attempted. I gave it the old college try. I am having zero success. Attempt 1 This was not successful. I think that Remote Debugger is trying to launch the EXE (which is an Intel app) instead of the platform-agnostic DLL. [Knowing this, I did a "dotnet build" on the Surface Pro X so that an ARM64 EXE was written out instead; VS2019 Preview 4 was then able to remotely launch and stop the app...but could not debug it, saying that no debug symbols were found/loaded.] Attempt 2 Attempt 3 Attempt 4 Thinking that perhaps Visual Studio built the files as Intel because there was no ARM64 SDK installed, I then also tried installing the .NET 6 Preview 1 SDK for ARM64 on my x64 machine. That of course did not work, as the installer targets only ARM64 CPUs. Attempt 5 |
Beta Was this translation helpful? Give feedback.
-
In case this is helpful to others, I found two successful ways to debug WPF on ARM64. Plus one that wouldn't work because Remote Deploy doesn't want to remote debug via loopback. Attempt 6 (Success) By sharing a folder inside my Hyper-V instance (or installing the optional Windows component "OpenSSH Server"), I'm able to compile WPF and other apps for "Any CPU" architecture inside VS2019 Preview 4 on my Surface Pro X. Then I can copy the folder over to the VM running in Hyper-V, start Remote Debugger in the Hyper-V VM and remote deploy and debug from VS2019. All of this is happening on my Surface Pro X. I also noted that I can add "x86" and "x64" variants to my WPF project in VS2019 Preview 4, save out a solution file, and then manually edit both the solution file and the project to add an "ARM64" option (copy and pasting the x64 entries and just renaming them to ARM64). VS2019 itself won't allow this, but it compiles the three variants without incident after VS reloads the edited files. If you have two ARM64 machines, it should be easy to edit in VS2019 on one and debug the process running on the other (without needing Hyper-V). At least for me, the Hyper-V solution was extremely extremely slow on a maxed-out Surface Pro X (possibly due to the beta nature of the Windows Insider builds). Attempt 7 (Biggest Success) Note that this has the caveat of needing to put a long pause (or perhaps a messagebox or readline) in the application's startup code temporarily...if one needs to debug code that runs early in the application's startup. Attempt 8 (Another failure, just for documentation) Summary With some luck, Visual Studio will gain support for cross-compiling WoA64 apps on x64 machines or Visual Studio will be compiled for ARM64 and support local ARM64 debugging. It's really cool seeing WPF on ARM64! If I run into any problems porting our application over, I'll post here with my experiences. |
Beta Was this translation helpful? Give feedback.
-
@christopher-rtf - Thanks for insights into success w.r.t 7 and 8. |
Beta Was this translation helpful? Give feedback.
-
@predavid |
Beta Was this translation helpful? Give feedback.
-
Turns out visual studio's ALINK (al.exe) doesn't support building for arm64. A workaround is available. |
Beta Was this translation helpful? Give feedback.
-
WPF ARM64 support is now available in .NET 6.0 Preview 1
Build available here
Please provide your feedback
Beta Was this translation helpful? Give feedback.
All reactions