TypeLoadException ImportSource

Feb 14, 2012 at 7:44 PM


I am having a problem using preview 5

var catalog = new AggregateCatalog();
var container = new CompositionContainer(catalog);

catalog.Catalogs.Add(new DirectoryCatalog(path));

Throw me this exception

{System.TypeLoadException: Could not load type 'System.ComponentModel.Composition.ImportSource' from assembly 'System.ComponentModel.Composition.CodePlex, Version=, Culture=neutral, PublicKeyToken=13e5ffd4e05db186'.}

Someone know how to solve this.


Feb 14, 2012 at 8:14 PM

I was missing register the dlls into the GAC!!