UWP清单问题/功能受限/输入前景观察 [英] UWP Manifest issue / restricted capability / inputForegroundObservation
问题描述
我正在尝试遵循此有关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.
干杯, 亚当
推荐答案
答案:
- 在
<package>
标记中,请勿在IgnorableNameSpaces
中包含wincap
或rescap
. - 您不需要公司帐户即可成功构建应用程序且没有错误.我使用的是可免费下载的Visual Studio Community 2015,于2017年3月3日全面更新.
-
rescap:Capability Name=
将继续在软件包XML编辑器中带有下划线,但这并不意味着您会遇到任何构建警告或错误. - 我在 MSDN文档指出
IgnorableNameSpaces
必须包含rescap
必须"-这显然使我失望,也可能使其他人感到困惑. - 更多信息
- In the
<package>
tag, do not includewincap
orrescap
inIgnorableNameSpaces
. - 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.
- 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. - I put a comment in the MSDN documentation that says that
rescap
"must" be included inIgnorableNameSpaces
- this was clearly throwing me off, and may well confuse others, also. - More information here.
希望这对某人有帮助.
干杯
这篇关于UWP清单问题/功能受限/输入前景观察的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!