Search code examples
c#nugetninject

Method from assembly 'Ninject.Extensions.Interception.DynamicProxy' does not have an implementation


I'm getting this runtime error:

Method 'CaptureProceedInfo' in type 'Ninject.Extensions.Interception.ProxyFactory.ObjectMethodsInvocation' from assembly 'Ninject.Extensions.Interception.DynamicProxy, Version=3.3.3.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7' does not have an implementation.

Searching for that error brought me to this Question. However, Ninject.Extensions.Interception.DynamicProxy is already installed.


Solution

  • The problem occurred when I updated the Moq NuGet package.

    As of the time of posting, the latest version of Ninject.Extensions.Interception.DynamicProxy is 3.3.3.

    When I upgraded Moq to the latest version, it also upgraded Castle.Core to the latest version (4.4.0).

    The problem is, Ninject.Extensions.Interception.DynamicProxy 3.3.3 only supports up to Castle.Core 4.3.1, not 4.4.0!

    Therefore, to solve, I needed to downgrade Castle.Core to 4.3.1, (which in turn downgraded Moq to 4.10.1).