views:

28

answers:

0

When I try to run the NUnit unit test for the FullDuplex sample I get the following exception. I am using the NServiceBus version for .NET Framework 4. I have not changed anything in the sample (other than to convert to VS2010 and change the .NET Framework version to 4.0 so it can use the .NET 4 binaries), and I am new to probably all of the libs used by the sample so sorry if this should be obvious!

MyServer.Tests.Tests.TestHandler: System.TypeAccessException : Attempt by method 'IBusProxyde61e8f2062b473c84fad3a4fcb9fd94.get_Repository()' to access type 'Rhino.Mocks.MockRepository' failed.

Here is the stack trace:

at IBusProxyde61e8f2062b473c84fad3a4fcb9fd94.get_Repository()
at Rhino.Mocks.MockRepository.IsStub(Object proxy) in :line 0
at Rhino.Mocks.MethodRecorders.MethodRecorderBase.AddToRepeatableMethods(Object proxy, MethodInfo method, IExpectation expectation) in :line 0
at Rhino.Mocks.Impl.MethodOptions'1.Any() in :line 0
at NServiceBus.Testing.Handler'1..ctor(T handler, MockRepository mocks, IBus bus, IMessageCreator messageCreator, IEnumerable'1 types) in d:\BuildAgent-03\work\d692fe98ef9a76ca\src\testing\Handler.cs:line 37
at NServiceBus.Testing.Test.Handler[T](T handler) in d:\BuildAgent-03\work\d692fe98ef9a76ca\src\testing\Test.cs:line 132
at MyServer.Tests.Tests.TestHandler() in D:\Dev\NServiceBus.2.0.0.1219\samples\FullDuplex\MyServer.Tests\Tests.cs:line 21

Can anyone help?

Thanks.