title: Difference between DirectoryCatalog and AssemblyCatalog
body: <p>I have a MEF application with a fairly large number of components in different dlls.  When the program starts up, I create an AggregateCatalog and then load all of the assemblies into it.  Due to the large number of components, this can take some time and causes delays in loading the app.  I'd like to delay some of the component loading until later, but I've run into a problem.  When I load the components using</p>
  
  <pre><code>this.AggregateCatalog.Catalogs.Add(new DirectoryCatalog("."));
  </code></pre>
  
  <p>I get about 125 components in the catalog and everything runs fine.  When I load each dll and exe individually using AssemblyCatalog, I only get about 77 components and the app fails to run due to missing components.  I've even created a directory listing and looped through it so that I didn't miss any files and come up with the same result.  My question is, What else is DirectoryCatalog doing that allows everything to work properly and how can I emulate it without loading everything in the directory at once?</p>