HOWTO: Get Regionerate to Run on Visual Studio 2010 Beta 2

Update: Visual Studio 2010 is now officially supported. There is no need to use this workaround.

I really hoped to get Regionerate running quickly on Visual Studio 2010 Beta 2.

Unfortunately, since there are several breaking changes with Visual Studio 2010’s extensibility model, I found myself messing around with it too much.

I’m not giving up, but I just need to clear an afternoon for it. Meanwhile, Since I’ve been getting a whole bunch of requests for quick support for 2010, here’s a quick workaround:

  1. Go to “%programfiles%\Regionerate”.
  2. Make a copy of “Regionerate.VS2005.AddIn” and call it “Regionerate.VS2010.AddIn“.
  3. Open it with notepad, change Extensibility/HostApplication/Version to 10.0 and save the file.
  4. Open up regedit.exe.
  5. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Visual Studio\10.0\AutomationOptions\LookInFolders.
  6. Add a string key namedC:\Program Files\Regionerate\” (or wherever you had Regionerate installed)
  7. Start Visual Studio 2010 and go to Tools/Regionerate Settings.
  8. Turn off Automatically collapse regions after Regionerating. (Yes, they won’t collapse until I fix it)

Update: Thanks for Mr. Bungle for reminding me to add step 4-6. Mike Patton enthusiasts FTW!

Add your comments here if you have any problems using this workaround.

 

This entry was posted on Tuesday, November 24th, 2009at 7:08 pm and is filed under Bugs, Known Issues, Public Beta, To Do, Visual Studio Addin, v0.7.3.0. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

 

6 Responses to “HOWTO: Get Regionerate to Run on Visual Studio 2010 Beta 2”

  1. Thanks for this info, seems I am missing something tho – I don’t see a Tools->Regionerate Settings menu after launching VS2010. Do I need to copy or register the .addin file somewhere?

    Posted by Mr. Bungle on November 25th, 2009 12:02 am

  2. IIdiot. Updated the post. Hope it would work now.

    Posted by rauchy on November 25th, 2009 7:19 am

  3. Adding that registry key does mean I have a Tools->Regionerate menu in VS 2010, however I get two exception errors on startup of VS relating to Regionerate. One is a DeprecatedException and the other is an ArgumentException (A command with that name already exists). I can email u screenshots of the exceptions if you want. Going into the Settings dialog for Regionerate works ok, but trying to regionerate a source file using Ctrl+R ends up putting VS into an endless loop, requiring it to be killed. I will stick with using the command line for now, passing the .sln file (so glad you have ability to do this outside the IDE :D ).

    Posted by Mr. Bungle on November 30th, 2009 1:18 am

  4. It might be worth noting that for those of you who have 64bit platforms, you probably won’t find the registry key mentioned because when you run regedit, it will give you the registry for your 64bit applications. Visual studio is still a 32bit application, so you’ll need the 32bit registry editor.

    To start 32bit regedit:
    %systemroot%\syswow64\regedit

    The default install location (ie, the key you will need to create) is:
    %ProgramFiles(x86)%\Regionerate

    After doing this, you will get a regionerate error message box when you first start up about deprecated methods. There isn’t much you can do here as there is just an ok button.

    Unfortunately, this message may have been more significant than I first though because after regionerating my first file, Visual Studio spiraled into unresponsive death.

    If anyone finds a way to get it to work on 64bit platforms, send an update.

    Posted by Pondy on December 15th, 2009 8:19 am

  5. Answer to my own problem:

    De-select the option “Automatically collapse regions after Regionerate”.

    Posted by Pondy on December 15th, 2009 8:28 am

  6. Thanks for this, after following the instructions I am back up and running.

    Its worth noting though, that to trigger regionerate you cannot use the pop-up right-click context menu. This doesn’t seem to work for me. However I can still configure and use a short-cut key (Ctrl+R by default) and this formats to the default style.

    Cheers
    Ben

    Posted by Ben on January 12th, 2010 2:25 am

 

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>