Search code examples
msbuilduwpwindows-10windows-10-universal.net-native

VS2017 fails to build UWP Store bundle (.NET Native, error in the ARM build)


I've just installed the newest Visual Studio 2017 update that was released yesterday (the one that added support for the Creators Update SDK), and now I can no longer build an app bundle for my app.

I'm targeting build 14393 and everything worked just fine up until this update.

It looks like the x86 and x64 packages are successfully built, but then the ARM one fails for some reason. I get this error in the output window:

2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(3899,5): error APPX0502: file 'C:\Users...\MyApp\bin\ARM\Release\Lockr_2017.407.108.0_language-de.appx' not found.

Here's the link to the full output window after the build finishes (fails): full build log

I've never had that error before. I already tried to restart the PC, restart Visual Studio, delete all the bin/obj/temp folders, I still have the same issue. I've also updated all the NuGet packages (including the new .NET Native 1.6.1. version that was released today).

NOTE: I tried not to generate an app bundle (so that VS would generate the three different x86, x64 and ARM packages) and that works fine. I need an app bundle to upload to the Store though.

NOTE #2: I tried to compile and deploy the app in Release mode (.NET native) on my Windows 10 Mobile device (so in ARM mode) and it works just fine, there's nothing wrong with the app and VS can compile it just fine this way. Yet the bundle is failing for some reason.

I don't know what to do from here, is there anything I can try to fix this?

Thank you for your help.


Solution

  • Please try the following:

    1. Download storepackageworkaround.zip. See details here.
    2. Close VS2017.
    3. Go to this folder:

      C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage

    4. Rename Microsoft.AppxPackage.Targets as Microsoft.AppxPackage.Targets.BAK.
    5. Extract Microsoft.AppxPackage.Targets from the ZIP file to the above folder.