Migrating to a New Extension Model in VS2010
Microsoft moves beyond macros, add-ins and packages with a new extension model in Visual Studio 2010 that offers powerful new ways to enhance your developer experience. The VS2010 code editor and shell, rebuilt using managed code, allows developers to build custom tools around extension points throughout the IDE. This is enabled by the Managed Extensibility Framework (MEF) library and Windows Presentation Foundation in .NET 4, on which it's built.
Visual Studio 2010 also introduces VSIX deployment, a container model for extensions that is based on the Open Packaging Convention. OPC is used in the Microsoft Office System Open XML specification, which is supported in Office 2007 apps and other Microsoft software. It stores the extension, manifest and payload in a standard ZIP file.
VSIX is part of the new Extension Manager in VS2010, which allows developers to manage their extensions, and share code templates, for example, in the Visual Studio Gallery from a menu within VS2010. Microsoft announced the Visual Studio Gallery, a community portal for hosting free and commercial add-ins and extensions in February 2008.
What does the new extension model in VS2010 mean for existing COM-based add-ins and plug-in tools beyond the code editor? The Extension Manager, which is designed to allow developers to participate in a broader extension ecosystem from within the IDE, supports VSIX-type extensions only--MEF components, VSPackages, project templates and item templates. It does not support add-ins, code snippets and other extension types.
According to documentation on Managing Visual Studio Extensions in the MSDN Visual Studio Developer Center:
Visual Studio continues to support deployment technologies such as the Visual Studio Content Installer (VSI) and the Microsoft Installer (MSI), but not through Extension Manager. The VSI format can be used for macros, add-ins, code snippets, and certain other Visual Studio extension types. The MSI format, which is used extensively for applications, can also be used for extensions. Both .vsi files and .msi files comprise complete packages that can be distributed, and that can be installed by double-clicking.
With the new extensibility model, many developers are concerned about having to rewrite existing add-ins as extensions in VS2010. See Plugged-in to Visual Studio for more on this issue.
Despite these changes, Microsoft is working to make extending the IDE easier for developers in general. The VS2010 SDK is 10MB, a considerably smaller download than its 100-MB predecessor in VS2008, according to Microsoft's senior vice president of the developer division, S. "Soma" Somasegar, primarily because samples and documentation are now hosted online. The DSL Tools SDK is also a separate download. "The [VS2010] SDK’s install time has also gone from 20 minutes to just over a minute," Soma noted in December in his blog, which highlighted the new extensibility model. At RTM on April 12, the VS2010 SDK documentation will also be available for local download, according to Microsoft.
The VS2010 SDK includes several extension templates for modifying the code editor with text adornments, classifiers and margins. VS2010 IDE WPF Style Guidelines are also provided in the SDK to help maintain consistency for developers who are using the WPF UI for their extensions.
As the extensibility of the IDE continues to improve, some developers have noticed that the ability to customize the UI layout of the new WPF-based code editor and shell (menus and toolbars) is somewhat limited compared to previous versions of Visual Studio.
In answer to a user comment on this point on Microsoft Connect, Suzanne Hansen, program manager, Visual Studio Platform Shell Team, responded:
We have tried to minimize the loss of functionality, but since the customization experience was so rich in previous versions, and we were faced with rewriting much if it from scratch, we have to make some cuts. We will be monitoring feedback on this area closely, and take customer feedback into consideration when planning the next releases of Visual Studio.
Express your views on the new extensibility model in Visual Studio 2010. Are you excited about the possibilities, or wondering about the migration of your existing add-ins? Drop me a line at email@example.com.
Posted by Kathleen Richards on 03/30/2010 at 12:54 PM