UWP 应用的受限功能 [英] Restricted capabilities on UWP apps

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

问题描述

我想做屏幕投影应用.根据 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 应用的受限功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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