2019年3月4日月曜日

Building UWP Apps as ARM64 with Visual Studio 2017

Yes, we have toolings that support ARM64 UWP Apps but there are several caviets and pitfalls. I've attempt to describe my experiences to support ARM64 on my UWP app with this short post. I wish this helps you.


Updating your tools


As of Mar 2019,
  • Visual Studio 2017 15.9.7 or later
  • Windows SDK 17763 or later

Modifying your .csproj to add ARM64 build configuration


This step is described at blogs.windows.com.


But.. in my cases, it didn't work. I have to modify my .csproj manually. However it's easy.
  1. Make the ARM64 debug/release config by copy and paste the ARM config. then,
  2. Make ARM64 build config by VS IDE (as described on the blog post).
  3. Adding win10-arm64 and win10-arm64-aot to runtimeidentifier. It seems that not necessary
I've just paste the before/after of my .csproj on gist. To compare it, please download both and use your favorite diff tools :)

WWC csproj 17763 vs 17134
https://gist.github.com/pnp0a03/bac76f72bc2526e674860c9e512605ba


Updating Microsoft.NETCore.UniversalWindowsPlatform


In fact, 6.2.x or above support the ARM64. 6.1.x is NOT. You need to use it. But.. currently (as of the end of jan 2019), 6.2.2 have issues -  build may success locally, but you will see the 1201 error when you submit the appx package to Microsoft Store. You need to pick the 6.2.3 or above.

https://github.com/Microsoft/dotnet/issues/924

To use the 6.2.3, just edit your .csproj manually.

(Added 14 March 2019 - 6.2.8 released. I could confirm that it works and ok for store upload.)


Updating Microsoft.Advertising.XAML to 10.1811.22001


If you use the Microsoft Advertisement SDK, you need to update to 10.1811.x.
There are two type of deployments - one is VSIX , another one is NuGet package.

My recommendation is, if you're currently using the VSIX, you should use the VSIX for the next version. Same for the NuGet.

If you want to switch to the NuGet from VSIX(This is my case), you must uninstall the VSIX from Add/Remove the Programs. But this way may be painfull for you, because the uninstallation of VSIX may affect to all other your project that use the Microsoft Advertisement.
Even if you did it as above, you may see the some of build error. My advises are .. 1) Restart the system, 2) Clear the nuget cache, 3) check the reference settings, and 4) Take a cup of coffee.


...Done?


Here is a my app that support Arm64. But... I have not tried yet with actual Arm64 system :) If you have a chance to try it, please let me know the result.

Wheel World Clock
https://www.microsoft.com/en-us/p/wheel-world-clock/9nblggh10zzn



0 件のコメント:

コメントを投稿