4

I have created a ReSharper 8.0 plugin project using the VS2010 project template "ReSharper 8.0 Plug-In and Tests". This complies and works fine. When I come to debugging it I hit F5 and a new instance of VS2010 is instantiated with my plugin loaded and my breakpoints are hit. The problem is when I stop debugging and then hit F5 again - I get this error popping up in the debug VS2010 instance, and I'm unable to debug:

Invalid Command Line. Unknown Switch : ReSharper.Plugin.

If I close VS2010 and open it again ReSharper isn't loaded at all (There is no ReSharper menu). The only thing that fixes this is Reparing it using the R# installer. I've tried deleting the files here: \AppData\Local\Microsoft\VisualStudio\10.0\Extensions\JetBrains\ReSharper but this doesn't help.

Please help me find a consistent way to debug without ReSharper becoming corrupt.

shanem
  • 63
  • 1
  • 5

1 Answers1

1

This sounds similar to the problem described in several issues on the ReSharper bug tracker. In particular, the "Move to experimental hive" feature, which first appears when ReSharper is run with /ReSharper.Internal.

There's a bug in ReSharper that incorrectly moves the settings silently, causing ReSharper to be removed from the "main" Visual Studio hive.

As a workaround, until this will be properly fixed, you can try removing this option from ReSharper's global config file, per this suggestion. This should at least prevent relocating ReSharper into the experimental hive.

In addition, remove the line:

<s:Boolean x:Key="/Default/Housekeeping/JumpVsixFromMachineToPerUser/IsEnabled/@EntryValue">False</s:Boolean>

from GlobalSettingsStorage.DotSettings (typically located in %AppData%\JetBrains\ReSharper\vAny), to force this feature popup to appear again the next time you run Visual Studio with /ReSharper.Internal.

Hope this helps.

Igal Tabachnik
  • 31,174
  • 15
  • 92
  • 157
  • I've just committed a change that should fix this in 8.2. Hooray! – citizenmatt Mar 20 '14 at 10:51
  • @citizenmatt Is this already live? My config file doesn't show have any of the settings mentioned in Igal's post or in the link. – phant0m Mar 22 '14 at 11:14
  • Yep. The fix is part of 8.2. If you don't have this in your settings file, it just means the setting is at the default value - enabled. When you start with `/ReSharper.Internal`, ReSharper will check to see if you're in a per-user install or not. If not, it will prompt to move it, and (as of 8.2) it will put the right value in the registry and when you restart, you won't see any difference. – citizenmatt Mar 22 '14 at 15:15
  • @citizenmatt Nevermind, I thought I was already using the new version but apparently I wasn't. Thanks anyway. – phant0m Mar 22 '14 at 16:59