Click here to Skip to main content
12,946,816 members (48,475 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have a Win 8 Desktop application with a Compass sensor build within the Laptop.


In order to use the sensor API's in WinForm App we need to add
section of Project file

Problem Starts Here:

The Compass reading property : HeadingTrueNorth has a default null value. In our App , if we are verifying for null or try to access this property the code is not compiling.

It says you must reference System.RunTime DLL.

transform.Angle = 360 - double.Parse(reading.HeadingTrueNorth.ToString());

Now the problem is we can't reference System.Runtime DLL because there is a conflict Types B/w 4.0 and 4.5 as we already Referenced Windows DLL which will be used for sensors etc.

How to resolve this ?
Posted 4-Oct-12 7:40am
Updated 4-Oct-12 7:41am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,059
CHill60 3,235
Maciej Los 2,538
Jochen Arndt 1,935
ppolymorphe 1,795

Advertise | Privacy | Mobile
Web02 | 2.8.170518.1 | Last Updated 4 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100