- Home /
Namespace not recognized
I've been having trouble getting the Windows.Devices.Sensors and CoreMotion namespaces to be recognized.
I'm using C# and have never had issues adding namespaces, but I'm unable to access their classes. Has anyone ran into this issue?
I've tried each of the following:
using Windows.Devices.Sensors;
using CoreMotion;
namespace Windows.Devices.Sensors{ code here }
namespace CoreMotion{ code here }
Update: Adding Windows.Foundation.UniversalApiContract.winmd to the project references granted me access to the Windows.Devices.Sensors namespace.
I still haven't found out how to do the equivalent for Apple devices using CoreMotion.
You probably have to add their DLL's to your project yet.
Thanks, I just tried adding it through Visual Studio by going to References->Add but it's not showing up in the list.
Hey, you probably have to install it trough a NuGet package, And then install it in your project folder.
Remember, you can only use .net 2.0 mostly, and some parts of 3.5. Anyways, if you need more help try to google it otherwise ask!
Your answer

Follow this Question
Related Questions
Can't use Namespaces with Mono and 1 class 1 namespace file 1 Answer
CSharpMsgrExtended: CS0246: The type or namespace name `Exception' could not be found. 2 Answers
The type or namespace "UnityEngine" could not be found - Can not edit scripts 2 Answers
Visual Studio 2017 namespace cannot be found on installed package 1 Answer