更改 UWP 应用的目标设备 [英] Change what devices a UWP app targets

查看:22
本文介绍了更改 UWP 应用的目标设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的 Windows UWP 应用仅针对特定设备,例如台式机和移动设备.如何指定我的应用应仅针对这些设备?我在 Package.appxmanifest 文件中没有发现任何有趣的东西,project.json 只指定了应用程序应该使用的 SDK.

I want to my Windows UWP app to target only specific devices e.g. desktop and mobile. How do I specify that my app should only target these devices? I have found nothing of interest in the Package.appxmanifest file, and project.json only specifies what SDK's the app should use.

推荐答案

有两种方法可以做到.

1.右击Package.appxmanifest,点击查看代码,可以在Package.appxmanifest中找到如下代码.

1 . Right click Package.appxmanifest, and click View code, you can find the following code in the Package.appxmanifest.

  <Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
  </Dependencies>

您可以将名称属性修改为Windows.Desktop"或Windows.Mobile"以定位特定设备类型.

You can modify the Name property to "Windows.Desktop" or "Windows.Mobile" to target a specific device type.

2 .当您在 Windows 开发人员中心提交您的应用程序时,您可以指定您的应用程序能够运行哪种类型的设备.在定价和可用性步骤中,您可以执行以下操作:

2 .When you submit you app in Windows Dev Center, you can specific you app are able to run which type of device. In Pricing and availability step, you can do it as follow:

我认为你最好选择第二种方式.

I think you'd better choose the second way.

这篇关于更改 UWP 应用的目标设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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