UWP应用仅定位于台式机/平板电脑吗? [英] UWP app targeted only to Desktop/Tablet?
问题描述
我正在尝试了解UWP应用如何工作。我正在看NuGet上的一些第三方库,但是由于缺少依赖关系,其中有些不能与UWP一起使用。
例如,某些PDF抽屉需要System.Drawing.dll,我认为在Windows Phone上可能无法访问。
鉴于我的应用程序无需在手机上运行,并且可以说平板电脑甚至不需要它……它主要是台式机应用程序……如何解决这些依赖关系问题?
我是否有某种方式仍可以使用这些第三方库;也许通过选择一个设置说根本不以Windows Phone为目标?
为减少您的困惑,我将尝试提供简单的说明。信息:
1)在开发UWP应用程序时,您可以定义要支持的设备系列。您可以在应用清单中进行操作-提供仅支持桌面系列的信息:
< Dependencies>
< TargetDeviceFamily Name = Windows.Desktop MinVersion = 10.0.0.0 MaxVersionTested = 10.0.0.0 />
< / Dependencies>
这是非常有用的链接:
希望这会有所帮助。
I'm trying to understand how UWP apps work. I'm looking at some third party libraries on NuGet, but some of them won't work with UWP due, I presume to missing dependencies.
For example, some PDF drawers need System.Drawing.dll which I presume may not be accessible on Windows Phone.
Given my app doesn't need to work on Phones, and it's arguably not even required for tablets... it's primarily a Desktop app... how can I get around these dependency issues?
Is there some way for me to still use these third party libraries; perhaps by choosing a setting to say not to target Windows Phone at all?
To reduce your confusion I will try to provide straight information:
1) When developing UWP application you can define which Device Family you would like to support. You can do it in the app manifest - provide the information that you support only Desktop family:
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
This is very helpful link: https://msdn.microsoft.com/library/windows/apps/dn986903
There you can find the information how to support different device families: For instance for Mobile and Desktop you can put:
<Dependencies>
<TargetDeviceFamily Name="Windows.Mobile" MinVersion="10.0.x.0" MaxVersionTested="10.0.y.0"/>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.x.0" MaxVersionTested="10.0.y.0"/>
</Dependencies>
Second very important thing is that when you plan not support any mobile devices you do not have to create additional packages for the ARM architecture:
Last operation that you can do is to configure "Pricing and availability" in the Windows Store section when publishing your app:
Hope this will help.
这篇关于UWP应用仅定位于台式机/平板电脑吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!