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">
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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…