Freigeben über


Creating extensions for VS 2010

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 It

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.

Sharing It

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.

Namaste!

Comments

  • Anonymous
    December 09, 2009
    FWIW, online documentation is no replacement for local documentation - and the new approach, the local web server, is far, far worse than the old Document Explorer.

  • Anonymous
    December 09, 2009
    The comment has been removed

  • Anonymous
    December 09, 2009
    This looks like a really good move in the right direction.  I was a bit intimidated to built add ons before, but I will give it a shot now.  Thanks!

  • Anonymous
    December 09, 2009
    The comment has been removed

  • Anonymous
    December 10, 2009
    Does this mean that someone in the community will be able to release an extension that adds back in color printing to VS2010?  I can't believe that feature got dropped - hopefully someone can pick up the ball where Microsoft left it on this one. Looking forward to a color-printing extension being released to VS2010, Mesan

  • Anonymous
    December 10, 2009
    Barry, Pete, and Taylor- I understand your preference for local documentation.  While it's not quite ready yet, at RTM the Visual Studio SDK documentation will be available for download for local offline use.  I hope this addresses your concerns. Polita Paulus Technical Assistant Developer Division

  • Anonymous
    December 10, 2009
    Great news... well done! I have 2 questions though:

  1. This the above VSIX and Extension Manager apply to DSL Tools also (I believe I may have read that DSL Tools will be a separate install - after the SDK install)?
  2. We have a significant investment in a DSL Language + Designer we made in 2008 - What if any "upgrade" paths are available for us to leverage that investment on Visual Studio 2010? Many Thanks Jaans
  • Anonymous
    December 10, 2009
    Mesan- Yes, you could build an extension to print in color. VS currently doesn't enable plugging into the print dialog though, so the extension author would also need to build their own print dialog. Polita Paulus Technical Assistant Developer Division

  • Anonymous
    December 11, 2009
    Jaans: About 1) : Yes, VSIX applies to DSL Tools DSL Tools is a separate install and the VS SDK has a link to it. Also, all the DSL Tools information is available from http://code.msdn.microsoft.com/DslTools, and the link on the download is there as well. About 2) : About the migration from VS2008 to VS2010: there is a migration tool installed with the DSL SDK. You'll find it at  %ProgramFiles%Microsoft Visual Studio 2010 Beta2 SDKVisualStudioIntegrationToolsDSLToolsDslProjectsMigrationTool.exe. Best regards Jean-Marc.

  • Anonymous
    December 13, 2009
    Hi, I use the class wizard extensively, I saw that it  was included again in VS2010 but it is still missing in the previous versions of visual studio .NET Do you think is possible to implement the functionality of the class wizard that was included with VC++ 6.0 as using the Visual Studio extensions SDK. Thanks, Marcelo

  • Anonymous
    December 15, 2009
    Glad there will be a downloadable version of the docs. I prefer online since it's just faster to browse. What would be super-extra-neat is if you created a mechanizm for devs to download also latest online updates (now that MSDN allows people to comment on things - which is a great feature and muchvalid information can be found there). Also I finally may try developing some extension since you say it's sooo much better (I've heard a lot of bad things about 2005 and 2008 extensibiliy).

  • Anonymous
    March 07, 2010
    great thing SDK size has reduced..20 mins to a minute that's just so amazing..

  • Anonymous
    April 29, 2010
    We have a requirement where the business wants the capability for the subject matter experts to add, edit, and potentially delete data entry controls without programming changes. The requirements for UI controls frequently change, and the business does not want to depend on development team to make the necessary changes! They are looking for a tool very similar to Visual Studio form designer which satisfies the above requirement. I would imagine somehow we should extend the standard UI controls with additional properties specific to our domain (e.g data source could be a property). Is there a way VSX can help to meet this requirement?  Any input in this regard will be very helpful.

  • Anonymous
    June 03, 2012
    Hi Somasegar, VS have really well designed MEF library to create extensions, but I wonder why formatting lines are so slow... ? I have this issue with VS, and can't find workaround few days, social.msdn.microsoft.com/.../90af2158-bab8-4f95-81c8-000692b6f211 Could anyone take a look from VS Dev team plz? I will be very grateful :) Thanks, Arsen