UWP 清单问题/受限功能/inputForegroundObservation [英] UWP Manifest issue / restricted capability / inputForegroundObservation

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

问题描述

我正在尝试关注这个StackOverflow 文章,参考这篇关于StackOverflow的类似文章,以及这个来自 UWP Windows 开发中心.

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

在我的清单 XML 中, 标记已更新为包含 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".

我的 部分如下所示:

My <Capabilities> section looks like this:

<代码><功能><能力名称="internetClient"/><rescap:Capability Name="inputForegroundObservation"/></能力>

并且 带有错误下划线:

And <rescap:Capability is underlined with error:

元素'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 Capability 有什么建议吗?VS 社区 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. 标签中,不要在IgnorableNameSpaces中包含wincaprescap.莉>
  2. 您不需要公司帐户即可成功且无错误地构建应用程序.我使用了可免费下载的 Visual Studio Community 2015,已于 2017 年 3 月 3 日全面更新.
  3. rescap:Capability Name= 将继续在包 XML 编辑器中带有下划线,但这并不意味着您将收到任何构建警告或错误.
  4. 我在 MSDN 文档rescap必须"包含在IgnorableNameSpaces 中——这显然让我失望,也很可能让其他人感到困惑.
  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.

希望这对某人有所帮助.

Hope this helps someone.

干杯,

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

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