I donwloaded Moq.4.0.10827 from www.code.google.com/p/moq and trying to add reference to Moq.4.0.10827\NET40\Moq.dll to Visual Studio 2010 C# project. Trying to build this project, I see this warning:
The referenced assembly "Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
Moq namespace is not recognized, and build fails. How can this be fixed?
Change your project not to use the .NET 4 client profile in your project properties.
You want the other one from this image.

Your project is targeting the .NET 4 Client Profile, change it to 'regular' .NET 4 and it'll work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With