While Visual Studio has a wealth of functionality built in, one of the keys to any modern platform is extensibility.
A main focus for us in Visual Studio 2010 has been to improve not only our API’s, but also the general ecosystem that surrounds extension development. The goal is simple – we want to make the entire process easier, from creation to publishing to consumption.
Before You Start…
One of the first things you’ll notice is the streamlined Visual Studio 2010 SDK.
The SDK is now just 10 MB in size, instead of the 100 MB it used to be. We accomplished this by moving the documentation and samples online, which allows us to provide and update content continuously. The SDK’s install time has also gone from 20 minutes to just over a minute.
Building extensions for Visual Studio 2010 has never been easier.
The SDK provides a set of project templates that help you build extensions ranging from adding visuals to the editor, all the way to menu commands and tool windows.
WPF is now a first class citizen within our extension templates. Right away, you can be up and running with a WPF tool window. Likewise it is easy to use XAML to design and add a custom piece of UI to the Visual Studio Editor. Extending the Editor has gotten significantly simpler and more robust. Previously, trying to do something as simple as getting the caret position took several lines of ugly interop code. With the new editor APIs you can do it in one line, without a trace of interop.
The possibilities for extensions are endless. Would you like to integrate your team’s social networking tools into the editor so you can share code straight from Visual Studio? Build an extension for it. Want to embed architectural diagrams or TFS history into the code editor? You can do that. Don’t like the default styles for keyword coloring? Change it with a few lines of code. With extensions, you can make Visual Studio into your own customized coding power tool.
Deploying your extension is no longer rocket science. There’s no need to build an MSI to share your extensions. The extension project templates all generate a VSIX file. VSIX is our new deployment unit that leverages the Open Packaging Convention zip format and takes advantage of xcopy deployment of your extensions.
With the new Extension Manager, users have the chance to find and download extensions directly from within the IDE. This experience is thanks to the new and improved Visual Studio Gallery, which allows you to share your creations with the world just by uploading your VSIX.
Now It’s Your Turn
The Visual Studio team blog contains a comprehensive walkthrough on building your own extension. I encourage you to visit the blog, and then get started building your own extensions to Visual Studio. Once you’ve built an extension, you can upload your extension to the Visual Studio Gallery to share it with others. You can choose to share it at no cost or charge for your extension, then customize your extension’s page with rich HTML. When you’ve published your page, your extension will be available in the Extension Manager under the Tools menu in Visual Studio.
Check out VS Extensibility Dev Center, the extensibility samples, and the SDK documentation to learn more about building extensions. I look forward to seeing your extensions on the Visual Studio Gallery.