devices.sensors命名空间的库参考? (Windows 10平板电脑) [英] Library reference for devices.sensors namespace? (windows 10 tablet)
问题描述
我花了几个小时寻找一个简单的答案,但没有走得太远。
总结我的问题:Surface Pro 3,Windows 10, Visual Studio Community 2015更新1.我想使用内置传感器访问设备方向。我知道我需要使用Sensors.Devices命名空间,这在我的C#项目中是不可用的。
我有Windows.Devices.Sensors.dll系统文件夹。如果我尝试通过项目添加对此的引用 - 引用 - 浏览...它不起作用。我收到错误无法添加引用...请确保该文件可访问,并且它是有效的程序集或COM组件。所以这似乎不是它。
大概这是一个安装内容,或者在我的项目中添加引用到相应库的问题。 />
如果有人能解释这里的内容,或者指出我的方向,我会非常感激。
>
我尝试过:
*在官方文件中寻找解释
*在论坛上寻找解释
*添加对Windows.Devices.Sensors.dll的引用
*寻找可能包含Devices.Sensors命名空间的其他库文件
亲爱的朋友
i当然你有问题用C ++
i去用了
使用 命名空间 Windows: :基础;
使用 命名空间 Windows :: Devices :: Sensors;
但我不能
我试过这个并解决了:
右键点击项目\\ \\ properties \ C / C ++ \消耗Windows运行时扩展
将其设置为true
之后你不需要任何dll
I have spent a couple of hours looking for a simple answer to this without getting very far.
To summarise my problem: Surface Pro 3, Windows 10, Visual Studio Community 2015 Update 1. I would like to access the device orientation using the built-in sensors. I understand that I need to use the Sensors.Devices namespace, which is not available in my C# project.
I have got Windows.Devices.Sensors.dll in the System folder. If I try to add a reference to this via Project - References - Browse... it doesn't work. I get the error "A reference ... could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component." So that doesn't seem to be it.
Presumably it is a question of either installing something, or adding a reference in my project to the appropriate library.
If someone could explain what's what here, or point me in the direction of something which does, I would be very grateful.
What I have tried:
* Looking for an explanation in official documentation
* Looking for an explanation on forums
* Adding a reference to Windows.Devices.Sensors.dll
* Looking for other library files which might contain the Devices.Sensors namespace
hi dear friend
i had your problem of course in C++
i went to use
using namespace Windows::Foundation; using namespace Windows::Devices::Sensors;
but i couldn't
i've tried this and solved :
Right click on the project \ properties \ C/C++ \ Consume Windows Runtime Extension
set it to true
after that you will not need any dll
这篇关于devices.sensors命名空间的库参考? (Windows 10平板电脑)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!