문제

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?

도움이 되었습니까?

해결책

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?

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top