Unknown Switch :ReSharper.Plugin problem


Hi, I have problem with Resharper SDK 8 b177

Running debug mode suddenly started causing following error

Invalid Command Line.  Unknown Switch :ReSharper.Plugin.
debug VS instance closes, after that,




Did anyone experienced similar problem?


Thanks in advance:)



Attachment(s):
err.jpg
9 comments

Hi. Have you switched to using ReSharper in a custom hive of Visual Studio? Does ReSharper run in a normal instance of Visual Studio?

0

Hey, I have the same problem with ReSharper.SDK.8.1.555. I have created a ReSharper plugin project using the VS2010 (32 Bit, professional) project template "ReSharper 8.0 Plug-In". It complies. When I hit F5 to debug I get this error popping up in my visual studio instance: Invalid Command Line. Unknown Switch : ReSharper.Plugin. Regards.

0

Can you show me the command line arguments from the Debug properties page for the project, please?

0

The command line arguments are: /ReSharper.Plugin ReSharperPlugin3.dll /ReSharper.Internal

Edit: Fixed it. Used the repair option in the setup installer from resharper and got a message that some custom-user installations prevents resharper from functionality.

Regards.

0

Matt,

Just to clarify, I started finding that problem today after installing the SDK again. Yes, as Martinez mentioned an easy way to _solve_ the problem is just "repair" your Resharper installation and that fixes the problem "temporary"... Let me explain:

  • First time you load your solution, resharper menu is present and resharper is loading in your "main" VS instance
  • You try to run your plugin, yes, it works, you see Resharper in the menu item loading in the internal mode
  • You close your debugging instance
  • You try to debug again, surprise, your Visual Studio is not loading Resharper again so it makes sense the /Resharper.Internal and /Resharper.Plugin options are not recognized by VS (the original error reported)
  • Now, this is the weird thing. You close your "main" VS instance
  • Now you open Visual Studio again, surprise, Resharper is not loading
  • Now you repair your R# installation again, the cycle continues (with the suprirse that even after reinstalling R# you lost your keyboard settings -even when R# correctly display them in the options panel)


I can confirm this issue... Running Resharper 8.1.23.546 (Full edition) with Visual Studio 12.0.21005.1 REL and Resharper SDK 8.1.555

(to confirm I just installed the SDK in three different machines and the issue is there).

0

Did you see a dialog asking if you wished to move the registration of ReSharper to a per-user location? And did you click yes?

0

Yes Matt,

The situation happens all the time. Next time you "repair" Resharper it detects the files in the user hive and remove those files. But again, as soon as you close your "debugging instance" and try to debug again the problem reappears.

Ideas?

0

Right. There's an issue, which seems to be due to Visual Studio, where ReSharper will relocate the VS registration files so they only run in the main VS hive (a hive is used for building VS extensions - has a separate set of configuration for each hive), but unfortunately, ReSharper can write the wrong value to the registry so that the registration files are in the wrong place. It's the "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\ExtensionManager\EnabledExtensions\JetBrains.ReSharper,8.1" value (change version numbers for VS and ReSharper). It should point to %LOCALAPPDATA%\Microsoft\VisualStudio\12.0\Extensions\JetBrains\ReSharper\v8.1 (with the env var expanded). ReSharper can get it wrong. You can edit this in the registry and ReSharper should stay working and good.

Alternatively, you can look at the GlobalSettingsStorage.DotSettings file in %APPDATA%\Roaming\JetBrains\ReSharper\vAny. Search for any lines containing the string "JumpVsixFromMachineToPerUser". Ideally, you should just have an "IsEnabled" value - this means you'll get the prompt if the registration is in the per-machine location. If you've got "IsRelocatingAutomatically", ReSharper will try and relocate without you doing anything - if you're being hit by the bug writing the wrong value to the registry, this will cause you pain. You can delete this line (it's an xml file, delete the element). After that, you should be safe.

Here's the issue: http://youtrack.jetbrains.com/issue/RSRP-354482

0

Please sign in to leave a comment.