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
Hi,
I'm using Moq, recently we start using "in" as modificator for parameters in methods and our test failed on this exception.
I did small project where I reproduce it (ConsoleApp3.zip). Problem seems to be when I'm trying get moq.Object.
We are using:
MS Test
.NET Framework 4.7.2
Moq 4.13.0
Castle.Core 4.4.0
Stack trace:
Castle.DynamicProxy.ProxyGenerationException: There was an error in static constructor on type Castle.Proxies.TestInterface1Proxy. This is likely a bug in DynamicProxy. Please report it. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Castle.Proxies.TestInterface1Proxy' threw an exception. ---> System.MissingMethodException: Method not found: 'Int32 ConsoleApp3.TestInterface`1.GetValueWithIn(Int32 ByRef, Boolean)'.
Hi @Shifty15, as you can see in the exception message, this is an error thrown by DynamicProxy (which Moq uses). Your issue is a duplicate of castleproject/Core#430. I'll close this issue as the bug has to be fixed somewhere else (in the .NET / .NET Core runtimes)... nothing we can do about this in Moq.
Hi,
I'm using Moq, recently we start using "in" as modificator for parameters in methods and our test failed on this exception.
I did small project where I reproduce it (ConsoleApp3.zip). Problem seems to be when I'm trying get moq.Object.
We are using:
MS Test
.NET Framework 4.7.2
Moq 4.13.0
Castle.Core 4.4.0
Stack trace:
Castle.DynamicProxy.ProxyGenerationException: There was an error in static constructor on type Castle.Proxies.TestInterface
1Proxy. This is likely a bug in DynamicProxy. Please report it. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Castle.Proxies.TestInterface
1Proxy' threw an exception. ---> System.MissingMethodException: Method not found: 'Int32 ConsoleApp3.TestInterface`1.GetValueWithIn(Int32 ByRef, Boolean)'.ConsoleApp3.zip
The text was updated successfully, but these errors were encountered: