TargetDeviceFamily not recognized
Asked Answered
P

2

7

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

Pseudoscope answered 1/9, 2017 at 23:47 Comment(1)
Hmm, using Windows.Desktop as a target is not so common. Only makes sense if you are using the UWP desktop bridge. A detail that belongs in the question. At least the version numbers are wrong, they must be Win10 versions. Do compare the appx manifest with a sample to find more possible differences.Levator
P
1

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

MinVersion="10.0.x.0" MaxVersionTested="10.0.y.0"
Platy answered 18/9, 2017 at 21:15 Comment(1)
Yup windows 10 ... x and y you can replace with the build of the windows 10. Or if you are using some other windows just replace 10 with whatever major version. mine is windows 7 so in mycase it shows 6.1.7601.0Platy
E
2

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>
Elective answered 12/9, 2017 at 5:41 Comment(1)
yes it does. i'll update the question to show the full packaging code.Pseudoscope
P
1

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

MinVersion="10.0.x.0" MaxVersionTested="10.0.y.0"
Platy answered 18/9, 2017 at 21:15 Comment(1)
Yup windows 10 ... x and y you can replace with the build of the windows 10. Or if you are using some other windows just replace 10 with whatever major version. mine is windows 7 so in mycase it shows 6.1.7601.0Platy

© 2022 - 2024 — McMap. All rights reserved.