Container = new CompositionContainer( new AggregateCatalog( new AssemblyCatalog( Assembly.GetExecutingAssembly() ) , new AssemblyCatalog( Assembly.LoadFrom( @"MEFVisualizer.Exe" ) ) ) ); Container.Compose( batch ); var meftoDgml = new MEFToDGML( Container){ IsNamespaceGrouping = true }; // The Visualizer meftoDgml.WriteToDGMLFile(); // Write to DGML file