Book Image

Visual Studio 2013 and .NET 4.5 Expert Cookbook

Book Image

Visual Studio 2013 and .NET 4.5 Expert Cookbook

Overview of this book

Table of Contents (14 chapters)
Visual Studio 2013 and .NET 4.5 Expert Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Working with Managed Extensibility Framework to write editor extensions


Visual Studio uses Managed Extensibility Framework (MEF) to extend most of the code instead of writing VSPackage. MEF is an extensibility framework built inside the framework to support the plugin function of the application. The plugin model has been used by the IDE itself to ensure that we can hook in some of the code inside the IDE as an MEF component so that when the IDE loads up, it can compose elements directly as extensions.

Before we get started with MEF, let's try to understand what it is and how it works.

MEF is a framework that is built on top of the reflection API that addresses one special kind of requirement, which most of the current developers are into. Modularizing an application is one of the biggest concerns for any software giant. When we try to implement a pluggable model, we generally look for some sort of a plugin-based modularization for our respective application and ultimately end up doing in...