I am attempting to unit test a silverlight 3 project. I am using:
Moq.Silverlight (3.0.308.2) NUnitSilverlight (http://www.jeff.wilcox.name/2009/01/nunit-and-silverlight/)
When I write a test that does not use moq, it works as it should.
When I use moq outside of a test, moq works as it should. (I mocked a interface and did a verify in a button handler as a proof)
But when I run a unit test that uses moq, I always get this:
System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
at Moq.ExpressionExtensions.ToStringFixVisitor..ctor(Expression expression)
at Moq.Interceptor.AddCall(IProxyCall call, SetupKind kind) in c:\Build\Moq Drop\moq\WorkingDirectory\trunk\Source\Interceptor.cs: line 104
at Moq.Mock.<>c__DisplayClassc2.<Setup>b__b() in c:\Build\Moq Drop\moq\WorkingDirectory\trunk\Source\Mock.cs: line 387
at Moq.PexProtector.Invoke<T>(Func
1 function) in c:\Build\Moq Drop\moq\WorkingDirectory\trunk\Source\PexProtector.cs: line 17
at Moq.Mock.Setup(Mock mock, Expression1 expression) in c:\Build\Moq Drop\moq\WorkingDirectory\trunk\Source\Mock.cs: line 371
at Moq.Mock
1.Setup(Expression`1 expression) in c:\Build\Moq Drop\moq\WorkingDirectory\trunk\Source\Mock.Generic.cs: line 194
at SilverlightMoq.Test1.TestFirst() in Test1.cs: line 23
Anyone have any ideas on this?