开发者

Castle Keeps giving me a System.TypeLoadException: Method 'myMethod' does not have implementation?

System.TypeInitializationException:
 The type initializer for 'XXX' threw an exception.

System.TypeLoadException:
 Method 'GetDocuments' in type 'YYY' from assembly 'ZZZ,
  Version=1.0.0.0, Culture=neutral PublicKeyToken=null'
  does not have an开发者_如何学Python implementation..

I am getting the above error when trying to resolve an object with Castle Windsor. After some Googling it seems that others have had this problem due to assembly version mismatches. I don't believe this can be my problem since the assembly containing 'myMethod' is referenced in one project. I have create another test project that attempts to resolve the object.

Can someone tell me what I'm missing here?

This is the component registration that fails:

private static void Register_IContentDirectory()
    {
        _container.Register(
            Component.For<IContentDirectory>()
                .ImplementedBy<DocumentumContentDirectory>()
                .ServiceOverrides(
                    ServiceOverride.ForKey("documentManagementServiceProvider").Eq(
                        "document.management.service.provider")
                ));
    }

UPDATE:

I have voted to close this Q. My problem is a dependency on another assembly. Not related to castle.


As mentioned by @Nick:

My problem is a dependency on another assembly. Not related to castle.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜