0

I've got a BackgroundTask which should be Extended with the ability to Play Music. Therefore, i Need to include this capability into the Package.appxmanifest-file. As soon as i include the capability

<uap3:Capability Name="backgroundMediaPlayback"/>

in the Package-Capabilities-section i get a Validation error stating the my app manifest must be valid as per scheme. If i remove the line above, everything works fine. My package node is as follows:

<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:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" IgnorableNamespaces="uap mp iot uap3">

I searched the web and found out that this could be a bug in Visual Studio, but it should be fixed from Version 15.2 on(https://developercommunity.visualstudio.com/content/problem/44306/package-an-uwp-project-with-capability-of-backgrou.html).

Nevertheless, i am not able to compile the app including above capability. I did also a repair of my VS2017 Installation, but it did not help. The app is targetting the Windows 10 fall creators update (10.0; build 16299) for both, min and max Version. It is designed to run on a raspberry pi.

Do you have some clues?

EDIT: The BackgroundTask has been created using the downloaded template from https://marketplace.visualstudio.com/items?itemName=MicrosoftIoT.WindowsIoTCoreProjectTemplatesforVS15

Roland
  • 133
  • 2
  • 12

1 Answers1

1

Referring to this post https://social.msdn.microsoft.com/Forums/windowsapps/en-US/8efde534-f84a-48d7-9dd5-fec5043a894c/uwphow-to-use-a-restricted-capability-?forum=wpdevelop

it seems it is necessary to Keep a certain order. However, moving the uap3-Capability before the DeviceCapability solved my Problem. Strange, isnt it?

Roland
  • 133
  • 2
  • 12