xamarin.forms - 如何从构建中排除 WinPhone
问题描述
我有一个 Xamarin.Forms 应用程序,它支持 iOS、Android 和 UWP。当我尝试使用 Azure 管道将其提交到 Windows Store 时,我对后者有疑问。我不断收到错误消息:
状态 400:{"code":"InvalidParameterValue","data":[],"details":[],"message":"AllowTargetFutureDeviceFamilies 未使用所有支持的平台进行更新:[Desktop、Mobile、Xbox、全息]","source":"Ingestion Api","target":"allowTargetFutureDeviceFamilies"} CorrelationId: d6b9d6a2-6906-4908-9832-28c8f3c45a36
以下是合作伙伴中心的外观:
看起来这个问题与 app.xap 和 Windows Phone 有关。我们不支持 Windows Phone,因此它在 Package.appxmanifest 中的外观如下:
<Dependencies>
<TargetDeviceFamily Name="Windows.Mobile" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
这是我的 UWP 项目的目标平台版本:
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
这是我的一些管道信息:
steps:
- task: richardfennellBM.BM-VSTS-Versioning-Task.Version-APPX-Task.VersionAPPX@2
displayName: 'Bump UWP Versions'
inputs:
VersionNumber: '$(Build.BuildNumber).0'
InjectVersion: true
variables:
BuildConfiguration: 'Release'
steps:
- task: VSBuild@1
displayName: 'Build project **\*UWP.csproj'
inputs:
solution: '**\*UWP.csproj'
msbuildArgs: '/p:AppxBundlePlatforms=x86
/p:AppxPackageDir="$(Build.ArtifactStagingDirectory)\AppxPackages\\"
/p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload'
platform: x86
configuration: '$(BuildConfiguration)'
clean: true
如何提交我的应用程序?如果这是问题,我该如何摆脱 Windows Phone?
解决方案
推荐阅读
- mysql - 用于聊天表的 mysql 引擎(堆/内存与 innodb)
- ruby-on-rails - 如何更新关联记录
- vuejs2 - Vue 过滤器中的 HTML 实体
- reactjs - 使用 Express.Router() 设置 Swagger UI
- c# - 使用 .NET Native 构建的 UWP 应用的象征性异常
- java - 使用 JVM Open J9 时应用程序(tomcat)在一段时间后停止响应
- c# - 用数据库中的数据填充组合框,然后从该组合框中用同一数据库中的另一个数据填充另一个组合框
- wordpress - 上传时发生错误。请稍后再试
- django - 如何将基于函数的视图更改为基于类的视图?
- sql - PostgreSQL 两个字段之间的百分比