Question

It seems that I cant use system.math class within the windows phone projects. I can't even add the mscorelib.dll manually (windows phone dlls are different than windows dlls)

Is there any way to use System.Math class within the windows phone SDK projects?

Was it helpful?

Solution

I've just tried and it works fine for me. I didn't need to do anything special or add any references, just the normal using System; and then (say):

decimal m = 10.6m;
m = Math.Round(m);

What happens when you try that?

OTHER TIPS

You get the Silverlight (Windows Phone version) CLR, so trying to add mscorlib from the normal CLR won't work - you need the mscorlib.dll specific to that CLR as the assembly structure is different.

It's inside my mscorlib however, have you tried re-adding the reference, or closing Visual Studio?

Try manually editing the .csproj file . It happens when you try to open projects that were built on nonbeta builds on a machine with beta build of the SDK.

Try adding this to the project file

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top