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

Uchiha Itachi
  • 1,251
  • 1
  • 16
  • 42
  • 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](https://github.com/Microsoft/DesktopBridgeToUWP-Samples/blob/master/Samples/AppServiceBridgeSample/cs/UWP/Package.appxmanifest) to find more possible differences. – Hans Passant Sep 18 '17 at 21:29

2 Answers2

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>
user2250152
  • 14,658
  • 4
  • 33
  • 57
1

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

MinVersion="10.0.x.0" MaxVersionTested="10.0.y.0"
BILAL AHMAD
  • 686
  • 6
  • 14
  • 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.0 – BILAL AHMAD Sep 19 '17 at 18:05