#region’s in Visual Studio

Tuesday, December 10, 2013 Labels:

I really don’t mind regions, when used correctly (ie: sparsely). The rest of the time, however, I want to rip them all out of any code I look at. I used to use some cool macros to automatically expand all regions, but since Microsoft killed macros in Visual Studio 2013..

So, for Visual Studio 2013, I settled on automatically expanding regions when a file is opened. That way people can organize their code all they want and I don’t have to deal with it.. 8^)

The extension is called 'I Hate #Regions'.

Sadly, it will only install on Visual Studio 2010 and 2012. So, open up the .vsix file into your favorite archive tool and add edit the extension.vsixmanifest file. Insert the following snippet at the end of the Vsix/Identifier/SupportedProducts section.

   <VisualStudio Version="12.0">

That’s it. You can download the I Hate #Regions extension from the Visual Studio Gallery.

Older Post Home Newer Post