TargetDeviceFamily 无法识别

TargetDeviceFamily not recognized

我的 package.appxmanifest 中有以下代码,我收到一个错误,指出 TargetDeviceFamily 是一个 "unrecognized XML element"...我不知道到底是什么正在进行,但这份文件是我发布我的应用程序的最后一件事,我正在失去理智。在 MSDN 上找不到任何内容,他们的支持也不那么支持。

代码:

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

错误:

修改:

当我删除 DependanciesTargetDeviceFamily 时,出现此错误:

您的 package.appxmanifest 是否包含所需的命名空间 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>

我认为您需要将最小和最大版本更新为

MinVersion="10.0.x.0" MaxVersionTested="10.0.y.0"