Oct 9, 2010 at 6:03 PM
Edited Oct 10, 2010 at 1:34 AM
Grab a type in the referenced assembly, or use a directory catalog. For example let's say the type is Foo and it lives in the Bar assembly which is referenced, then this code would work....
var catalog = new AssemblyCatalog(typeof(Foo).Assembly));
This technique would also allow you to work with in memory dynamically emitted assemblies. You can also use a DirectoryCatalog also. For example let's say you have an extensions folder off of your bin....
var catalog = new DirectoryCatalog(@".\Extensions");
Regardless of which path you choose you would then add that catalog either directly to the container or to an aggregate catalog.