As I known, Pex supports the following two kinds of framework settings PexAssemblyInfo.cs
:
// Microsoft.Pex.Framework.Settings -- 1
[assembly: PexAssemblySettings(TestFramework = "VisualStudioUnitTest")]
And
// Microsoft.Pex.Framework.Settings -- 2
[assembly: PexAssemblySettings(TestFramework = "VisualStudioUnitTestSilverlight")]
Is there any framework settings for windows phone 7?
If we use this setting #2 (TestFramework = "VisualStudioUnitTestSilverlight")
We got exception when we test classes which are Windows Phone OS special( e.g. "Microsoft.Devices.DeviceType").
The exception info is: Message = "未能加载文件或程序集“Microsoft.Phone, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e”或它的某一个依赖项。The system cannot find the file specified."
No, you can't. You need to run your unit-tests in the emulator, no matter how you put it.