Release mode appxbundle file created with Visual Studio 2015 Update 3 won't install on windows phone. This was working in Update 2. Installed field medic on phone and eventually found the error:
Windows cannot install package 5207311c-9598-4622-9d3d-ff43d5fceb38 because this package depends on another package that could not be found. This package requires minimum version 1.4.24201.0 of framework Microsoft.NET.Native.Runtime.1.4 published by CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US to install. Provide the framework along with this package.
How do I get this working?
Debug packages / packages compiled without the .NET Native Toolchain will install ok but not sure if that is the way to go?
Steps to reproduce:
- Open Visual Studio 2015 Update 3
- Create new Blank App (Universal Windows).
- Goto Project > Store > Create App Packages
- Select No in first window (do you want to build packages to upload to windows store)
- Select Release versions on second window then Create.
- Copy created appxbundle file to sdcard on phone
- Click on appxbundle to try and install - nothing happens. Eventually traced above error message for our app using Field Medic. Same process worked fine in Update 2.
Phone we're using is Nokia Lumia 635 with Windows 10 version 1511 (in developer mode)
UPDATE
Solved by adding a PackageDependency line to the Package.appmanifest:
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
<PackageDependency Name="Microsoft.NET.Native.Runtime.1.4" MinVersion="1.4.24201.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>
UPDATE 2
The above fix works for release builds but when I try to run debug builds on an emulator I now get an error during deployment:
DEP0001 : Unexpected Error: -2147009293
If I remove the PackageDependency line the error goes away. How should this be configured so it works all the time?