问题
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?
回答1:
If you open the App Package's root folder, you will find a dependency folder like below:
And inside this folder you can find Microsoft.NET.Native.Runtime.1.4.appx
files under different architecture folders, which is needed for installing the app:
You can copy the ARM\Microsoft.NET.Native.Runtime.1.4.appx
file to your phone and install it manually. It should resolve the problem. Let me know if it doesn't work.
回答2:
DEP0001 : Unexpected Error: -2147009293
I got this error when I was trying a new app on the Windows phone while there was another old development app from a previous project on the same phone and both apps did had the "Entry point" set to the default "FPCL.WIndows.App". Removing the other, old App from the phone or changing the Entry point to something unique may solve this problem.
来源:https://stackoverflow.com/questions/38594736/uwp-app-package-created-with-visual-studio-2015-update-3-wont-install-on-phone