UWP清单问题/功能受限/输入前景观察 [英] UWP Manifest issue / restricted capability / inputForegroundObservation

查看:109
本文介绍了UWP清单问题/功能受限/输入前景观察的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试遵循有关StackOverflow的文章,请参考与此类似的关于StackOverflow的文章,以及

I'm trying to follow this StackOverflow article, referring to this similar article on StackOverflow, and this from the UWP Windows Dev Center.

在清单XML中,<Package>标记已更新为包括xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"IgnorableNamespaces="uap mp wincap rescap".

In my manifest XML, the <Package> tag was updated to include xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" and also IgnorableNamespaces="uap mp wincap rescap".

我的<Capabilities>部分如下所示:

<Capabilities> <Capability Name="internetClient" /> <rescap:Capability Name="inputForegroundObservation" /> </Capabilities>

<Capabilities> <Capability Name="internetClient" /> <rescap:Capability Name="inputForegroundObservation" /> </Capabilities>

并且<rescap:Capability下划线带有错误:

元素'Capabilities'...具有无效的子元素...在...命名空间.../windows10/restrictedcapabilities ..."

"The element 'Capabilities'... has invalid child element...in...namespace.../windows10/restrictedcapabilities..."

(我删除了很多非常长的错误消息)

(I snipped away much of the very long error message)

关于如何获得inputForegroundObservation能力的任何建议? VS Community 2015 sp3,已安装Microsoft.NETCore.UniversalWindowsPlatform软件包.

Any advice on how I can get the inputForegroundObservation Capability recognized? VS Community 2015 sp3, Microsoft.NETCore.UniversalWindowsPlatform package installed.

干杯, 亚当

推荐答案

答案:

  1. <package>标记中,请勿在IgnorableNameSpaces中包含wincaprescap.
  2. 您不需要公司帐户即可成功构建应用程序且没有错误.我使用的是可免费下载的Visual Studio Community 2015,于2017年3月3日全面更新.
  3. rescap:Capability Name=将继续在软件包XML编辑器中带有下划线,但这并不意味着您会遇到任何构建警告或错误.
  4. 我在 MSDN文档指出IgnorableNameSpaces必须包含rescap必须"-这显然使我失望,也可能使其他人感到困惑.
  5. 更多信息
  1. In the <package> tag, do not include wincap or rescap in IgnorableNameSpaces.
  2. You do not need a corporate account to build the app successfully and without error. I used the freely-downloadable Visual Studio Community 2015 fully updated as of 2017-03-03.
  3. The rescap:Capability Name= will continue to be underlined in the package XML editor, but this does not mean you will have any build warnings or errors.
  4. I put a comment in the MSDN documentation that says that rescap "must" be included in IgnorableNameSpaces - this was clearly throwing me off, and may well confuse others, also.
  5. More information here.

希望这对某人有帮助.

干杯

这篇关于UWP清单问题/功能受限/输入前景观察的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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