Xamarin.Forms no longer work on UWP ARM64

Created on 20 Mar 2019  路  16Comments  路  Source: xamarin/Xamarin.Forms

Description

Xamarin.Forms took a dependency on Win2D.uwp at v3.6. However Win2D does not support ARM64, so that support was lost in that move.

Steps to Reproduce

  1. Build a 3.6 UWP app for ARM64
  2. Deploy and run on an ARM64 device

Expected Behavior

App runs

Actual Behavior

App will crash

Basic Information

Also see this related issue:
https://github.com/xamarin/Xamarin.Forms/issues/5188

  • Version with issue: 3.6+
  • Last known good version:3.5.x
  • IDE: VS2017/2019
  • Platform Target Frameworks:

    • UWP:

  • Android Support Library Version:
  • Nuget Packages: 3.6.x
  • Affected Devices: ARM64 PCs
3.6.0 1 good first issue help wanted low regression inactive UWP bug up-for-grabs

Most helpful comment

New version of Win2D with ARM64 support just got pushed: https://www.nuget.org/packages/Win2D.uwp/1.24.0

All 16 comments

@davidortinau what can we do to improve support for UWP across Xamarin.Forms?

As a workaround, you can install the update package from here: https://github.com/Microsoft/Win2D/issues/637

Looks like the official package will be updated soon. https://github.com/Microsoft/Win2D/pull/665

@davidortinau what can we do to improve support for UWP across Xamarin.Forms?

Win2D team has merged ARM64 support now. Until they release a stable nuget package use the Win2D repro as submodule and compile the code on your own and deliver the self compiled DLL in XF. When they release a new official version, switch back to official NuGets.

@dotMorten

ok, there will be official Nugets of Win2D the next days, so maybe this can be fixed in 4.3? @samhouts

@MagicAndre1981 I assume you don't have to wait for 4.3, but can just reference a newer Win2D in your UWP project.

sure, but normal users don't know this. So next XF version should include the updated Win2D dependencies

Of course. Just saying you aren't blocked and forced to wait for 4.3

New version of Win2D with ARM64 support just got pushed: https://www.nuget.org/packages/Win2D.uwp/1.24.0

@samhouts ok, can you now update the dependency to the 1.24.0 to fix the issue? Now that Microsoft presented the Surface X with ARM CPU this should be added very soon.

@MagicAndre1981 I can, but this seems like such a great Hacktoberfest PR, I would hate to steal it from the community!!! If it isn't picked up before the end of the month, I'll take care of it. :)

@samhouts I currently don't have an ARM64 device. I'll use my 950XL till December before I install Desktop Win10 for ARM on my 950XL

@samhouts

any update on this? I've added the Win2D.uwp 1.24.0 package to the UWP part, but ARM64 still fails to compile with a lot of random errors. I have now Win10 Pro 1909 ARM64 on the Lumia 950XL and would like to test the ARM64 build

ok, the UseDotNetNativeIncremental setting caused my random compile errors in debug mode. App runs in debug mode via remote debug without the _UseDotNetNativeIncremental_ setting after adding

<Type Name="Xamarin.Forms.Platform.UWP.WindowsPlatformServices" Serialize="Required All" />

to default.rd.xml of my app.

Bumping the package would require increasing the target platform version to 17134, so I'm marking this as a breaking change.

@samhouts

no, you need to add this entry to csproj to skip the check:

<DisableWin2DPlatformCheck>true</DisableWin2DPlatformCheck>

does debugging of UWP app works for others? I get random errors in DEBUG configuration, but when I create AppX file in Release mode, sideload the AppX, the app works.

_// Edit, fixed. ARM64 uses .net native even for debug so I need to call Xamarin.Forms.Forms.Init with a list of assemblies and here the 3rd party documentation missed 1 assembly_

Was this page helpful?
0 / 5 - 0 ratings