问题
Actually I already resolved this issue but still I'm not really happy with the way I resolved this issue.
I have VS2010 SP1 and I need SP1 to work with Azure SDK.
First of all installing Pex and Moles somehow created problems with System.XML.dll. It just disappeared from References in all projects. I had to explicitly find it and connect it to all solutions that used it.
Also, there was a bigger issue with Moles itself. TestProjects just weren't able to find Microsoft.Moles.Framework.dll. And it generated all kinds of errors.
When I tried to add reference to Microsoft.Moles.Framework in "Add Refernce" dialog I got message: "Microsoft.Moles.Framework, Version=0.94.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" is incompatible with .NET Framework 4
Solution was to explicitly add reference to Microsoft.Moles.Framework.dll in C:\Program Files\Microsoft Moles\PublicAssembliesSilverlight. And after that all works fine so far.
I hope this info can be helpfull to someone.
来源:https://stackoverflow.com/questions/8475441/cant-reference-microsoft-moles-framework-dll-in-visual-studio-2010-sp1