Still Unable To Load Mef Component Dll -

var catalog = new DirectoryCatalog(@"path"); var container = new CompositionContainer(catalog); try container.ComposeParts(this); catch (CompositionException ce) Console.WriteLine(ce.Message); foreach (var e in ce.Errors) Console.WriteLine(e.Description);

private readonly AggregateCatalog _catalog = new AggregateCatalog(); public SafeDirectoryCatalog(string path) foreach (var dll in Directory.GetFiles(path, "*.dll")) try var asm = Assembly.LoadFile(dll); _catalog.Catalogs.Add(new AssemblyCatalog(asm)); catch (Exception ex) // Log but don't crash Console.WriteLine($"Failed: dll - ex.Message"); still unable to load mef component dll

[Export(typeof(ITest))] public class TestExport : ITest Then check MEF’s internal catalog – log all parts found. Dynamo, for example, has MEF_DEBUG=true . Otherwise, attach a debugger and hook AssemblyLoad / AssemblyResolve . Step 3 – Use Assembly.LoadFile manually Write a small test script in the host (if possible) or a separate console app: var catalog = new DirectoryCatalog(@"path"); var container =