Reputation: 17905
I'm creating composition container using root DirectoryCatalog.
var catalog = new DirectoryCatalog(".");
Bootstrapper.CompositionContainer = new CompositionContainer(catalog, true);
My executable is "Main.exe" 2 issues:
Upvotes: 4
Views: 1032
Reputation: 42434
For the first part of your question you can use the overload which accepts a search filter for files
var catalog = new DirectoryCatalog(".", "My.Company*.dll"); // asemblies to load
To load both *.exe and *.dll do:
var catalog = new AggregateCatalog();
catalog.Catalogs.Add(new DirectoryCatalog(".")); // load only *.dll's
catalog.Catalogs.Add(new DirectoryCatalog(".", "*.exe")); // load *.exe
Bootstrapper.CompositionContainer = new CompositionContainer(catalog, true);
Upvotes: 10