Visual Studio 2012 and macros

Paul Eremeev

The new version of the Visual Studio 2012 development environment doesn't support creation of simple automation macros anymore. Microsoft was planning to abandon macros in their IDE long ago, having made the first attempt to do so in the early beta version of Visual Studio 2010, but they had to bring back the macros support in the final version under the pressure of the discontented users.

Microsoft actually stopped developing the macros system in Visual Studio long ago, which becomes apparent once you open the embedded Macro IDE. Moreover, you still can create macros only in Visual Basic, while other .NET languages have never got any support. At the same time, according to the usage statistics, just a bit less than 1% of all the Visual Studio users regularly use macros (at least, if we can believe the statistics by Microsoft), while the disproportion between their usage and costs on supporting the backward compatibility of macros grows even bigger with each new IDE version. According to the MSVS developers on the official MSDN forums, Microsoft will start investing these resources into support of other, more full-fledged, automation methods and environment extensions available in Visual Studio, beginning with the Visual Studio 2012 version. These extensions, in particular, include the extension modules Add-In and Extension Package. These types of IDE extensions will allow programmers to interact with the development environment at a much deeper level compared to macros, while they will still be able to use the EnvDTE automation model which serves as a basis for all those Visual Studio macros. It means that the full functionality of these macros of yours will be available in extensions as well.

Since Visual Studio extensions are in fact independent dll libraries, it may seem at first that using them instead of usually disposable macros is not practical. Actually, creating extensions of this kind is nowadays simple and transparent as never before, regardless of your previous experience of working with Visual Studio (this will be true, of course, if only we expect the complexity of these extensions' functionality to be comparable with that of macros). You can easily try to create your own extension starting with simple steps described in this article. This guide will allow you to create a completely functional managed extension module for all the Visual Studio versions literally within 10 minutes and start using your functional at once, while the rest articles of this series will help you find out the particular details.