samedi 21 février 2015

Loader exception : getter has no implementation

I'm debugging some code that loads a number of dlls from disk like so



AggregateCatalog aggregateCatalog = new AggregateCatalog();
LoadedPlugins loadedPlugins = new LoadedPlugins();

aggregateCatalog.Catalogs.Add(new DirectoryCatalog(pluginPath));

CompositionContainer compositionContainer = new CompositionContainer(aggregateCatalog);

compositionContainer.ComposeParts(loadedPlugins);

foreach (IPlugin plugin in loadedPlugins)
if (!_plugins.ContainsKey(plugin.Title))
_plugins.Add(plugin.Title, plugin);


There is one particular DDL that causes the following exception:



MSG: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.


LOADER EXCEPTION: {"Method 'get_Title' in type 'Client.MyClass' from assembly 'Client.MyClass, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.":"Client.MyClass"}



I have checked my source and decompiled the dll to make sure and the public property Title is like so:



public String Title
{
get { return "My Title"; }
}


I'm at a loss as to what is going wrong here?






Aucun commentaire:

Enregistrer un commentaire