3
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 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.

Ritch Melton
  • 11,498
  • 4
  • 41
  • 54
Nick
  • 19,198
  • 51
  • 185
  • 312

1 Answers1

0

As mentioned by @Nick:

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

Krzysztof Kozmic
  • 27,267
  • 12
  • 73
  • 115