Using Regionerate on VS2012 or an alternative add-on

I very often use Regionerate to reorganize code files. My only problem is that I cannot register it on VS2012. I completely abandoned VS2010 in favor of VS2012, and it seems to me that I need to flip back to run the macro to reorganize the code files. I have never tried writing a VS add-on before, so I'm not at all familiar with the object model or how to register - it seems that the old add-ons are more difficult to install than the VS2010 extensions! I also looked through the WIX setup XML and tried to replicate the registry keys to no avail.

Does anyone know how to register Regionerate with VS2012, or is there an alternative (free and supported!) Extension that provides the same functionality?

+8
visual-studio-2010 visual-studio-2012 region add-in
source share
3 answers

Two things you need to register:

  • It seems that VS2012 does not read from the HKLM key ... \ 11.0 \ AutomationOptions at run time, only at the first start. You must also set the appropriate key in HKCU ... \ 11.0_Config \ AutomationOptions.
  • New .AddIn file must be created with version 11.0

If you do, Regionerate will appear, but will try to use Studio when you try to use it. Regionerate code has an incorrect version check ("not equal" instead of "less"), which gets stuck in code that does not work for VS2010 / 2012. Unchecking "Automatically collapse regions" in the Regionerate settings may be enough to avoid bad code.

I made a new version that fixes version checking and has the correct settings for VS2012. You can download the installer and modify the source files here:

https://skydrive.live.com/redir?resid=2FEB8D1988F04D77!565

+9
source share

This is what you need to do in order for VS2012 compatible Regionerate (0.8.0.1) on Frank Racis work with Visual Studio 2013.

  • Change this file: C:\Program Files (x86)\Regionerate\Regionerate.VS2012.AddIn Change version 11 to 12: <Version>12.0</Version>

  • Add the following string value to your registry:

    Location: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\AutomationOptions\LookInFolders

    Name: C:\Program Files (x86)\Regionerate\

+6
source share

CodeMaid is a free and actively developed alternative. It has almost all Regionerate features, as well as some new things. The only thing I really like is to configure it to organize and clean up unsaved files every time I create.

+4
source share

All Articles