问题描述
我想做屏幕投影应用.根据 MSDN,我需要在 Package.appxmanifest 中有一个重新命名空间.我写了这个xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
,但没有出现命名空间.我还需要什么吗?
I want to make screen projection application. And according to MSDN I need a rescap namespace in Package.appxmanifest.I Wrote thisxmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
, but namespace does not appears.Do I need something more?
推荐答案
在 Package.appxmanifest 中添加 rescap 命名空间时,将 'rescap' 添加到 IgnorableNamespaces 属性.
In the Package.appxmanifest when you add the rescap namespace, add 'rescap' to the IgnorableNamespaces property.
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap mp rescap">
已VS 告诉您Capability"不在rescap"命名空间中,并且不允许您构建应用程序.将名称添加到 IgnorableNamespaces 可让您使用rescap"命名空间,而不会破坏应用程序并让您使用受限功能.
Edited: VS tells you "Capability" aren't into "rescap" namespace and doesn't let you build the application. Adding the name to the IgnorableNamespaces let you use the "rescap" namespace without breaking the application and letting you use the restricted capability.
这篇关于UWP 应用的受限功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!