TargetDeviceFamily not recognized

307 views Asked by At

I have the following code in my package.appxmanifest, and I'm getting an error that the TargetDeviceFamily is an "unrecognized XML element"... I don't know what the hell is going on, but it's this document is the last thing from me publishing my app, and I'm losing my mind. Can't find anything on MSDN and their support wasn't that supportive.

Code:

  <Dependencies>
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="6.3.0" MaxVersionTested="6.3.0" />
  </Dependencies>

Error:

enter image description here

Amendment:

When I remove the Dependancies and TargetDeviceFamily, I get this error: enter image description here

2

There are 2 answers

1
BILAL AHMAD On BEST ANSWER

I think you need to update the min and max versions to

MinVersion="10.0.x.0" MaxVersionTested="10.0.y.0"
1
user2250152 On

Does your package.appxmanifest contain the required namespace http://schemas.microsoft.com/appx/manifest/foundation/windows10?

<Package 
  xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10">
  ...
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="6.3.0" MaxVersionTested="6.3.0" />
  </Dependencies>
</Package>