问题
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:
You need Windows.Media.Capture.Frames not System.Media.Capture.Frames
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