缺少 System.Media.Capture.Frames 命名空间

Missing System.Media.Capture.Frames namespace

我正在尝试为 Microsoft HoloLens(使用 this tutorial) but I'm encountering a problem. In the code of this tutorial, there's being referenced to the System.Media.Capture.Frames namespace and it seems like I'm missing this namespace. Looking at the Windows universal samples from Microsoft 开发条码 reader 应用程序(使用 this tutorial) but I'm encountering a problem. In the code of this tutorial, there's being referenced to the System.Media.Capture.Frames namespace and it seems like I'm missing this namespace. Looking at the Windows universal samples from Microsoft,也引用了此命名空间。但是,我无法导入此命名空间。

有谁知道我怎样才能访问这个命名空间?

两个可能的问题:

  1. 你需要Windows.Media.Capture.Frames而不是System.Media.Capture.Frames

  2. Windows.Media.Capture.Frames 是 build 14393 的新功能,因此您需要确保您的应用至少针对该目标:

转到您应用的项目属性,并确保在“应用程序”选项卡上将您的目标版本设置为 Build 14393。或者在文本或 XML 编辑器中打开 csproj 并在那里设置 TargetPlatformVersion:

<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>

如果您的最低版本低于 14393,那么请确保在调用 Frames 函数之前使用 ApiInformation class 进行功能检测以确保它们存在。