UWP Manifest issue / restricted capability / inputForegroundObservation

后端 未结 2 1610
青春惊慌失措
青春惊慌失措 2021-01-24 05:48

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

In my manifest XML, the <

相关标签:
2条回答
  • 2021-01-24 06:08

    Answer:

    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.

    Cheers,

    0 讨论(0)
  • 2021-01-24 06:22

    For Visual Studio 2019. The order is also important. I was putting the rescap:Capability last and kept getting the build error. It works if it's first, before other capabilities

    From https://docs.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations#restricted-capabilities

    All restricted capability elements must come before any CustomCapability and DeviceCapability elements under the Capabilities node in the package manifest.

    0 讨论(0)
提交回复
热议问题