Unable to package for the HoloLens (2)

I am working through the tutorial here (https://docs.microsoft.com/en-us/windows/mixed-reality/unreal-uxt-ch6) and trying to do the last step of packaging the HoloLens 2 application to an .appx that can be deployed on the device. However, the build is failing - and I think this is because it is trying to build multiple architectures instead of just ARM or ARM64.

This is on Unreal Edition 4.25.1-13594126+++UE4+Release-4.25

Plugins enabled: Mixed Reality UX Tools, Microsoft Windows Mixed Reality 1.0, HoloLens 1.0
Project Settings - Build Configuration = Shipping
Supported Platforms = HoloLens

Then I Package for HoloLens.

  1. The build fails with this error:
    UATHelper: Packaging (HoloLens): ERROR: Stage Failed. Missing receipt ‘D:\Epic\UE_4.25\Engine\Binaries\HoloLens\UE4Game-HoloLens-ShippingMulti.target’. Check that this target has been built.
    UATHelper: Packaging (HoloLens): (see C:\Users\larso\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Epic+UE_4.25\Log.txt for full exception trace)

  2. I copy UE4Game-HoloLens-SHippingarm64.target as UE4Game-HoloLens-ShippingMulti.target, the build can proceed further.
    It then fails at makeappx.exe with error 80080204

The errors 1+2 both suggest that UE4 is trying to build / target to multiple architectures which will fail due to a lack of target and then fails due to makeappx being unable to simultaneously build for ARM and x86, x64 at the same time.

I can’t find a way to only target to ARM64, the architecture for HoloLens 2. Any ideas how to fix? Is this a problem with a particular version of UE4?

I created a new project without starter assets. I set to the HoloLens platform only before doing the first attempt to build/package. This time I succeeded and passed ‘makeappx.exe’ to create the package. I believe somewhere the other project got architectures cached as a setting and I couldn’t fix/change the build.

I eventually hit the same problem and found it was due to adding the UXTools-Unreal plugin into the project. I’ve created an issue here (Unable to package for HoloLens after including UXTools in UE 4.25.1 project. · Issue #6 · microsoft/MixedReality-UXTools-Unreal · GitHub). If anyone has an idea for how to get the UE project to build/package only using ARM64 architecture let me know.

I’ve tried both Blueprints and C++ projects, still without solving the problem. I suspect that the C++ project may give a bit more control in how VS2019 builds the 3rd party plugin.