You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.MissingMethodException: Method not found: 'Void Castle.DynamicProxy.ProxyGenerationOptions.AddDelegateTypeMixin(System.Type)'.. Stacktrace at Moq.CastleProxyFactory.CreateProxy(Type mockType, IInterceptor interceptor, Type[] interfaces, Object[] arguments) at Moq.Mock`1.InitializeInstance() at Moq.Mock`1.OnGetObject() at Moq.Mock.get_Object() at Moq.Mock`1.get_Object() at Msei.Fsd.OpcUaFoundationDriver.TestDoubles.OpcSessionTestDouble.get_Object()
We are using:
Moq v.4.13.0,
Castle Core 4.4.0
What is interesting: it works in Visual Studio but fails in vstest.console.exe from command line
The text was updated successfully, but these errors were encountered:
This is almost certainly a problem with your project setup / NuGet tooling. Make sure the right version of Castle.Core gets loaded. I'm going to close this since with 99.9% certainty, the problem doesn't reside with Moq, but with your own project. If you think that's in error, please post a repro project.
Thank you for quick response.
You are right.
I just have found the issue: There were two test projects in solution. First one referencing older moq and, as result, older version of Castle.Core.DLL.
vstest.console.exe was executed for both projects. It looks like moq and Castle.Core.DLL have been loaded once. I have changed order of the projects referencing under vstest.console.exe and it started work. Microsoft vstest.console.exe does not check required versions of DLLs!
System.MissingMethodException: Method not found: 'Void Castle.DynamicProxy.ProxyGenerationOptions.AddDelegateTypeMixin(System.Type)'.. Stacktrace at Moq.CastleProxyFactory.CreateProxy(Type mockType, IInterceptor interceptor, Type[] interfaces, Object[] arguments) at Moq.Mock`1.InitializeInstance() at Moq.Mock`1.OnGetObject() at Moq.Mock.get_Object() at Moq.Mock`1.get_Object() at Msei.Fsd.OpcUaFoundationDriver.TestDoubles.OpcSessionTestDouble.get_Object()
We are using:
Moq v.4.13.0,
Castle Core 4.4.0
What is interesting: it works in Visual Studio but fails in vstest.console.exe from command line
The text was updated successfully, but these errors were encountered: