views:

293

answers:

4

I would like to make a plug-in for visual studio... But I have no idea where to start. While it was quite easy to find guides for Eclipse plug-in development, I'm having troubles to find a good guide for VS plug-in development.

I guess what I'm trying to ask here, is where do I start?

+1  A: 

Never developed a single plug-in for Visual Studio, but nevertheless here are my thoughts.

Plugins for VS were historically a nightmare to build: all these COM interfaces sticking out from various odd ends, WEIRD_CONSTANTS_IN_GLOBAL_SCOPE, etc. If I were to develop a VS plugin, I'd target Visual Studio 2010, which is, as they say, is really nicer in this respect.

Moreover, if your plugin has anything to do with C#/VB.NET code, consider writing a plugin for ReSharper.

Anton Gogolev
+1  A: 

there's a codeplex project here that shows how to create a VS plug-in, but I found it to be quite involved, and more detailed around the specific implementation, than a generic 'getting started with plug-ins' guide...

anyway - it might be a starting point for you :)

IanR
+2  A: 

I suggest to start here: http://www.mztools.com/resources_vsnet_addins.aspx This is great set of resource for VS add-in developers. Creating VS add-in is quite easy. Some keywords if you want to search for more: VS add-in (plugin is not very used), VS extensibility, VS automation.

Peter Macej
+1  A: 

The best place to start for pointers to tools, documentation, etc... is the Visual Studio Extensibility Dev Center on MSDN.

What you want to do next really depends on what you're trying to build. If you want just a simple plugin (maybe a menu command that runs some code against the Visual Studio Automation model: EnvDTE), you could do an Addin. (There are templates for Addins in-the-box under Other Project Types -> Extensibility in the New Project dialog.)

If you want your extension to be a "first class citizen" (i.e. full API access like the other extensions in the box), you should download the Visual Studio SDK and create a VSPackage.

While Visual Studio remains (even in 2010) a largely COM-based application, there are managed libraries (e.g. Microsoft.VisualStudio.Shell.*) and interop assemblies for accomplishing many kinds of extensions.

The Editor in Visual Studio 2010 was rebuilt in managed code and uses MEF as its extensibility model. You can also find templates for MEF-based editor extensions in the Visual Studio SDK for 2010.

Aaron Marten