Search code examples
dependency-injectionmef

Help getting started with MEF


I was reading somewhere that with MEF I can simply drop a dll into a directory and my application (with some MEF magic) will be able to read it and execute the code in it? Hopefully only classes that implement an interface that I define??

Can someone help me to get going, with some links maybe for my problem.

I've looked through some of the docs, but nothing seems to be what I'm after and its tricky when I don't know exactly what to search on...

Thx S


Solution

  • Here are two MEF "Getting Started" posts by Brad Abrams:

    Note that these were written using preview versions of MEF, so there have been some changes. For example, AttributedAssemblyCatalog has been renamed to AssemblyCatalog, AggregatingComposablePartCatalog is now AggregatingCatalog, and the PackageCatalog on Silverlight is now DeploymentCatalog, and has had some other API changes.