Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a Win 8 Desktop application with a Compass sensor build within the Laptop.

BackGround:

In order to use the sensor API's in WinForm App we need to add
<TargetPlatformVersion>8.0</TargetPlatformVersion>
under
<PropertyGroup> 
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 4.0.0.0 DLL.

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


Now the problem is we can't reference System.Runtime 4.0.0.0 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
Updated 4-Oct-12 7:41am
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900