Chapter 53. managed extensibility framework (mef)
WHAT'S IN THIS CHAPTER?
Architecting extensible applications
Hosting the Managed Extensibility Framework in your applications
Understanding the Visual Studio 2010 Editor components
Extending the Visual Studio 2010 Editor
Importing Visual Studio Services
Creating loosely coupled applications that can be extended after deployment can be a difficult process. You have many design decisions to make, including identifying and loading extensions that have been deployed, and making application services available to loaded extensions. The Managed Extensibility Framework (MEF) is an open source library created by Microsoft designed to reduce the complexity of creating extensible applications. It allows you to expose reusable parts of your application to plug-ins or extensions that are discovered and loaded at run time and design your application in a very loosely coupled fashion.
Visual Studio 2010 uses the MEF library to provide extension points for the main editor control. It is expected that in future versions of Visual Studio, more areas will be exposed for this kind of extension.
This chapter is split into three sections. The first section is an introduction to how MEF works and how to use it in your own applications. The middle section describes the components of the new Visual Studio 2010 Editor control and how they interact. The final section describes the process of extending the editor with MEF and provides a complete sample which emphasizes ...