Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hbulens/b7a3cb12bfeff7e675c1fb3de598933d to your computer and use it in GitHub Desktop.
Save hbulens/b7a3cb12bfeff7e675c1fb3de598933d to your computer and use it in GitHub Desktop.
AggregateCatalog catalog = new AggregateCatalog();
// Add all the parts found in all assemblies in
// the same directory as the executing program
catalog.Catalogs.Add(
new DirectoryCatalog(
Path.GetDirectoryName(
Assembly.GetExecutingAssembly().Location )
)
);
CompositionContainer container = new CompositionContainer(catalog);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment