MEF CTP2 released with source code.

My team released MEF CTP2 on codeplex at, this time with source code. We also created a number of documents (i.e. wiki pages) and samples that demonstrate how to use MEF.

What problems does MEF solve?

MEF presents a simple solution for the runtime extensibility problem. Until now, any application that wanted to support a plugin model needed to create its own infrastructure from scratch. Those plugins would often be application-specific and could not be reused across multiple implementations.
  • MEF provides a standard way for the host application to expose itself and consume external extensions. Extensions, by their nature, can be reused amongst different applications. However, an extension could still be implemented in a way that is application-specific. Extensions themselves can depend on one another and MEF will make sure they are wired together in the correct order (another thing you won't have to worry about).
  • MEF offers a set of discovery approaches for your application to locate and load available extensions.
  • MEF allows tagging extensions with additional metadata which facilitates rich querying and filtering

[MEF Overview]

By all means please provide us with what you like and\or dislike about MEF at Discussions.

1 Comment

  • I looked at the example in the Codeplex. I am wondering what would happen if I create another class that implements IMessageSender in the same Assembly.
    for example,
    all the code as in the example and then add this
    public class regularMailer : ImessageSender
    public void Send(....) //.... means if there are parameters that will be added
    System.Console.WriteLine("generate a PDF version and print");
    now I will have two classes that have the same footprint of IMessageSender.

    Also, what if I want to create different assemblies and put them in the same folder? How will the MEF example work?

Comments have been disabled for this content.