【发布时间】:2022-01-25 22:17:06
【问题描述】:
我正在尝试将一个包(使用来自 monogame 的普通 uwp 模板构建)发布到 Windows 应用商店,它显示以下消息:
The package abcdefg_1.0.8.0_x86_x64_bundle.appxupload can’t be encrypted because it targets
the Windows.Mobile platform, which does not support encryption. The package will be encrypted
in your sandbox environments, but it will be published unencrypted to the Store.
这导致微软问我这个问题:
The Target Device Family in the AppxManifest is set to Windows.Universal but that
means that your game can’t be encrypted due to Windows.Mobile not supporting it. Please set
the Target Device Family to Windows.Xbox and Windows.Desktop
instead so that your build can be encrypted and then resubmit the new build.
如果我将目标设置为 Windows.Desktop(在 Appx_Manifest 中将 TargetDeviceFamily 设置为 Name="Windows.Desktop"),它仍然可以正常编译和构建,但商店会显示一些新错误,例如:
Validation error: FrameworkDependencyVersionConflict - 10.0.0.0, Microsoft.VCLibs.140.00 14.0.30704.0, 10.0.10042.0
Validation error: FrameworkDependencyVersionConflict - 10.0.0.0, Microsoft.VCLibs.140.00 14.0.30704.0, 10.0.10042.0
Validation error: FrameworkDependencyVersionConflict - 10.0.0.0, Microsoft.NET.Native.Framework.2.2 2.2.29512.0, 10.0.10049.0
Validation error: FrameworkDependencyVersionConflict - 10.0.0.0, Microsoft.NET.Native.Framework.2.2 2.2.29512.0, 10.0.10049.0
Validation error: FrameworkDependencyVersionConflict - 10.0.0.0, Microsoft.NET.Native.Runtime.2.2 2.2.28604.0, 10.0.10049.0
Validation error: FrameworkDependencyVersionConflict - 10.0.0.0, Microsoft.NET.Native.Runtime.2.2 2.2.28604.0, 10.0.10049.0
是否有一种方法可以从 uwp-build 中删除 windows.mobile,或者是否有一种更简单的方法可以只针对 Windows.Desktop 和 Windows.Xbox?或者有没有一种简单的方法来修复 FrameworkdependencyVersionConflict?
谢谢,
哈利
【问题讨论】:
-
您可能需要更改项目文件中的最小版本,例如
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.10049.0" MaxVersionTested="10.0.10049.0" /> -
修复了它。对于 Windows.Xbox,minVersion 必须为 10.0.14000.0。感谢您的帮助!
-
我会将评论转换为答案,请接受它作为答案。这可以帮助面临同样问题的其他人。
标签: uwp win-universal-app uwp-xaml windows-10-universal monogame