Missing System.Media.Capture.Frames namespace

孤者浪人 提交于 2020-01-07 05:53:05

问题


I'm trying to develop a barcode reader app for the Microsoft HoloLens (using 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, there's also being referenced to this namespace. However, I cannot import this namespace.

  • I'm running on Windows 10 Version 1607 Build 14393.693
  • I have .NET Framework 4.6.2
  • My Windows is fully up-to-date

Does anyone have any idea how I can get access to this namespace?


回答1:


Two likely problems:

  1. You need Windows.Media.Capture.Frames not System.Media.Capture.Frames

  2. Windows.Media.Capture.Frames is new for build 14393 so you'll need to make sure your app targets at least that high:

Go to your app's project properties and make sure your target version is set to Build 14393 on the Application tab. Alternatively open the csproj in a text or XML editor and set the TargetPlatformVersion there:

<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>

If your minimum version is less than 14393 then make sure you do feature detection with the ApiInformation class before calling the Frames functions to make sure they exist.



来源:https://stackoverflow.com/questions/41977891/missing-system-media-capture-frames-namespace

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!