views:

287

answers:

4

I tried to search but if this is a duplicate it is hidden by some noise. Alternate title to the question:

What skills to look for when needing integration with the Visual Studio IDE?

A: 

A mix. The core is C++/COM stuff, but a lot of the newer stuff is managed code (C# etc). Due to the core being C++/COM (with a pile of code 'borrowed' from MS Office), VS integration is a funny experience.

KristoferA - Huagati.com
You mean creating add ons? This is precisely why I am asking the question.
ojblass
@ojblass -- VS integration can be created in managed code.
Dustin Campbell
@ojblass - Add-ins/addons/VSIP etc uses COM interfaces but you would generally write them in managed code. Two headaches you will encounter are a) how VS (like exchange etc) load .net assemblies in a different way than 100%-managed-code-apps and b) COM interop casting and cleanup stuff normally not needed in 100%-managed-code-apps. Oh, and the messed up/inconsistent interfaces involved in VS integration. :)
KristoferA - Huagati.com
+4  A: 

The podcast Herding Code episode #48 features an interview with Dustin Campbell, a program manager on the Visual Studio Managed Languages Group.

In that interview he talks for several minutes about this exact issue and gets into details about why the changes in 2010 are breaking compat with 2008 and how the future looks.

If this is strictly a curiousity question the other answers are correct. But if you want to dig a little deeper, listening to the podcast would be well worth your time.

Bubbafat
I am wondering what skill set to look for when the job requires Visual Studio Integration components to be developed.
ojblass
@ojblass -- if you're referring to language skills, C++ and C# are a good place to start. Having the ability to pick up other languages quickly is a plus.
Dustin Campbell
@ojblass to add to Dustin's comment - C# or C++ skills are good, but also understanding of the differences between COM and .net, CLR debugging are heavily involved if you want to do some serious VS integration. To shorten the learning curve I would look for someone who has [successfully] developed something that integrates with the VS IDE (any version - the interfaces are the same for 2002/2003/2005/2008) with just some minor additions in every new version.
KristoferA - Huagati.com
+10  A: 

Visual Studio 2008 is written in both native and managed code, though the bulk is written in C++. There are several pieces of Visual Studio that have always been written in managed code (e.g. the property browser, the WinForms Designer). And of course, Visual Studio 2008 is stitched together with COM.

In Visual Studio 2010, there is an effort to move more of the IDE to managed code. The text editor and the shell (i.e., menus, toolbars, document and tool window frames, etc.) are written in C#. In addition, pieces of the C# and VB IDEs are being written in C# and VB respectively. The new language, F#, is written completely in managed code -- the compiler, the language service, the project system, etc. -- are all written in F#.

You can use C#, VB or C++ to integrate with Visual Studio 2008. However, given that Visual Studio is built on COM, a good understanding of COM/ATL will be helpful. In addition, if you choose to use a managed language, a knownledge of COM interop and mixed-mode debugging will be extremely helpful. Note that there are a few levels of VS integration:

  1. Macros -- the simplest way to run custom code in the IDE.
  2. Add-in -- A simple but powerful way to build custom functionality into the IDE. With an add-in, you can create custom commands, listen to events, manipulate text in the editor, etc. However, you cannot add, say, a new language or editor to the IDE with an add-in. For many purposes, an add-in works fine.
  3. Package -- this is the same level of integration as Microsoft's features use. With a package, you can create pretty much anything in the Visual Studio IDE, including adding new languages.

You should note that these become progressively more complex to author and deploy.

In Visual Studio 2010, a new form of extensibility is being introduced in several areas of the IDE, but primarily for extending the new WPF text editor. Going forward, integration with Visual Studio will require MEF (Managed Extensibility Framework) components rather than COM. So, in VS 2010, extending the text editor will simply require authoring a MEF component in your favorite managed language.

Dustin Campbell
+3  A: 

At least the following languages are used inside of Visual Studio 2008

  1. C++
  2. C#
  3. VB.Net
  4. C
  5. C++/CLI
  6. C++ with managed extensions

Probably a few others that I forgot about.

JaredPar
I am curious at number 4 above... what part of it?
ojblass
@ojblass, #4 is more of a personal opinion. When you don't use classes, destructors, templates and managed memory with malloc and free I call it C even if it's compiled with a C++ compiler.
JaredPar
I tend to agree C++ implies some non OO might be lingering. I think your answer is correct but the answer above addresses all my concerns. +! cheers
ojblass