Friday, August 24, 2012

Ricci shows us another way to handle missing macros in VS2012... Converting them to an AddIn

Alkampfer's Place - Converting Visual Studio Macro to Visual Studio plugin

Visual Studio 2012 is really faster than 2010, this is due to an excellent work of the team to maximize performance and because in this release some of the older and less used part of the IDE were removed. One of this part is the Macro editor that is not anymore available in Visual Studio. This is one of the feature I missed most because I’ve used it in the past to automate some basic task, like attach to IIS automatically with a keyboard shortcut. The Macro engine had some limitation, it supported only Visual Basic, it was old code that needs time to be maintained and finally everything you can do with a Macro can be done with Visual Studio Plugin so there was no need to maintain anymore in the product.

If you used macro with VS2010 and you want to use them in VS2012 you need to create an addin, the easiest way is to go for a Visual Studio Package:



I've seen a few comments recently about macros not being in VS2012 and while they've not be in the Beta's or RC's either, RTM brings with it a whole new crowd who are just discovering this now.

If you relied on marco's there's a couple things you can do. Ricci's approach above is one (and one the I think, in the end, might be best, in that it provides easier reuse, more power, etc.) and John Robbins NuGet/PowerShell approach.


Related Past Post XRef:
Missing Macros in VS11 getting you down? John Robbins shows us how to use NuGet and PowerShell as an replacement

No comments: