UWP AppX Package creation failed when using .net Native

0

I have a solution as follows:

  • App 1 Project (Universal Windows App)
  • Portable Class Library Project (Target Window 8, .NET 4.5, ASP.NET Core)
  • Style Class Library Project (Universal Windows App)

I have build configurations debug & release configured identically (at least I hope so), except using .net native in release Configuration.

When creating a AppXBundle for App 1 using the wizard in VS2017, it creates different results for the detected dependencies:

Debug\Dependencies\x64:

  • Microsoft.VCLibs.x64.14.00.appx
  • Microsoft.NET.CoreRuntime.1.1.appx

Release\Dependencies\x64:

  • Microsoft.VCLibs.x64.14.00.appx
  • Microsoft.NET.Native.Runtime.1.6.appx
  • Microsoft.NET.Native.Framework.1.6.appx
  • Microsoft.NET.CoreRuntime.1.1.appx

When installing the App-X Package created in debug configuration, using the generated Add-AppDevPackage.ps1, everything works fine. When doing the same thing with the App-X Package created in release configuration, I get the following error:

Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation. Windows cannot install package 93ede192-831a-47ed-b309-5c4901fd7ffc because package Microsoft.NET.CoreRuntime.1.1 was provided but not used. This could be because package 93ede192-831a-47ed-b309-5c4901fd7ffc does not depend on Microsoft.NET.CoreRuntime.1.1. Only the packages that package 93ede192-831a-47ed-b309-5c4901fd7ffc depends on can be installed.

Assumption: The Microsoft.NET.CoreRuntime.1.1.appx dependency should not be added during package creating, as .net native is selected in Release Configuration. When removing the file manually after package creation, installation works.

Question: Why is this dependency added in release configuration? Is this a bug?

Note: On Project Style Class Library Project (Universal Windows App), there is no option to enable .NET native on the build tab, I think because of its output type (Class Library). Root cause?

Thanks

uwp
windows-10-universal
appx
asked on Stack Overflow May 27, 2017 by Sebastian Zolg

1 Answer

-1

After cleaning up the solution and configuring all build configurations again, when compiling x64 or x86, the issue is now gone.

I couldn't say exactly which setting caused it, but if someone else is facing this one, I would recommend to check the following first:

  • Build configuration of x64 & x86
  • Assure .net native is selected on release configuration for alle UWP Apps
  • Assure portable libraries are targeted correctly.
  • Clean the solution & rebuild all configurations for debug & release
  • Try again creating the store package

Thanks.

answered on Stack Overflow Jun 1, 2017 by Sebastian Zolg

User contributions licensed under CC BY-SA 3.0