使用 Visual Studio 2015 Update 3 创建的 UWP 应用程序包不会安装在手机上 [英] UWP App Package created with Visual Studio 2015 Update 3 won't install on phone

查看:23
本文介绍了使用 Visual Studio 2015 Update 3 创建的 UWP 应用程序包不会安装在手机上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Visual Studio 2015 Update 3 创建的发布模式 appxbundle 文件不会安装在 Windows 手机上.这在更新 2 中有效.在手机上安装了现场医生并最终发现了错误:

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 无法安装包 5207311c-9598-4622-9d3d-ff43d5fceb38,因为此包依赖于另一个无法找到的包.此包需要至少 1.4.24201.0 版本的框架 Microsoft.NET.Native.Runtime.1.4 由 CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US 发布才能安装.提供框架和这个包.

我如何让它工作?

在没有 .NET Native Toolchain 的情况下编译的调试包/包可以安装,但不确定这是否可行?

Debug packages / packages compiled without the .NET Native Toolchain will install ok but not sure if that is the way to go?

重现步骤:

  • 打开 Visual Studio 2015 更新 3
  • 创建新的空白应用程序(通用 Windows).
  • 转到项目>商店>创建应用程序包
  • 在第一个窗口中选择否(您要构建要上传到 Windows 的软件包吗?商店)
  • 在第二个窗口中选择发布版本,然后选择创建.
  • 将创建的 appxbundle 文件复制到手机上的 sdcard
  • 点击 appxbundle 尝试安装 - 没有任何反应.最终使用 Field Medic 为我们的应用程序跟踪了上述错误消息.相同的过程在更新 2 中运行良好.

我们使用的手机是诺基亚 Lumia 635 和 Windows 10 版本 1511(在开发者模式下)

Phone we're using is Nokia Lumia 635 with Windows 10 version 1511 (in developer mode)

更新

通过在 Package.appmanifest 中添加 PackageDependency 行解决:

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>

更新 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

如果我删除 PackageDependency 行,错误就会消失.应该如何配置它才能让它一直工作?

If I remove the PackageDependency line the error goes away. How should this be configured so it works all the time?

推荐答案

如果你打开 App Package 的根文件夹,你会发现一个像下面这样的依赖文件夹:

If you open the App Package's root folder, you will find a dependency folder like below:

在这个文件夹中你可以找到Microsoft.NET.Native.Runtime.1.4.appx文件在不同的架构文件夹下,这是安装应用程序所需要的:

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:

您可以将 ARM\Microsoft.NET.Native.Runtime.1.4.appx 文件复制到您的手机并手动安装.它应该可以解决问题.如果它不起作用,请告诉我.

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.

这篇关于使用 Visual Studio 2015 Update 3 创建的 UWP 应用程序包不会安装在手机上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆