Child pages
  • Suspend ReSharper 5 in Visual Studio
Skip to end of metadata
Go to start of metadata

This article describes how to temporarily remove ReSharper from Visual Studio without actually uninstalling it by putting ReSharper into the Suspended state. Restoring ReSharper back to normal functioning is called Resuming.

When suspended, ReSharper stops any background operations, removes its UI, and frees as much memory as possible. This is also useful for diagnostics, as any side-effects introduced by ReSharper will most likely also go away (at least after Visual Studio is restarted). The suspended state is persisted between Visual Studio restarts.

The below information applies to ReSharper version 5, or any of the JetBrains .NET family products (like DotTrace or TeamCity AddIn) released after R# v5.

Note: in previous versions of R#, it were possible to suspend the product through the Visual Studio Add-In Manager. This scenario is now not possible because R# is not an add-in anymore.

Suspend or resume ReSharper at:

User Interface

Go to Visual Studio Options, ReSharper / General page.

Normally, the dialog has the Suspend button. In the suspended state, it has the Resume button instead. The buttons switch the product state immediately.

For other products, look for the options page under the specific product name.

Command Line

To ensure the desired product state on Visual Studio startup, use the command line parameters:

  • ReSharper.Suspend – starts Visual Studio with the product in the suspended state.
  • ReSharper.Resume – starts Visual Studio with the product running normally.

The full notation for these command line keys is <ProductName><Dot><CommandLineArgName>[<Dot><VsRootSuffix>], so for DotTrace running in an experimental VS suffix called Exp this would be DotTrace.Suspend.Exp.

UI Commands

The product has state management actions available as Visual Studio commands that are, unlike other actions, not disabled and hidden when the product gets suspended.

The actions are (by action ID):

  • Suspend – suspends a running product. This action is only enabled when the product is running normally.
  • Resume – resumes a suspended product. This action is only enabled when the product is suspended.
  • ToggleSuspended – toggles the suspended state of the product: resumes a suspended product or suspends a running product. This action is always enabled.

Note that the Visual Studio command ID is formatted like <ProductName><Underscore><ActionID>, eg ReSharper_ToggleSuspended. This is the form in which the actions should be used throughout the VS interface.

How to use:

  • In the Find combo on the Standard toolbar (Ctrl+D), type a right angle bracket and the action name to execute an action. This window has intellisense to help with action names. Example: >ReSharper_ToggleSuspended.
  • In the Command tool window (Ctrl+Alt+A), type the action name to execute an action. This window has intellisense to help with action names. Example: ReSharper_ToggleSuspended.
  • In the Immediate tool window (Ctrl+Alt+I), type a right angle bracket and the action name to execute an action. This window has intellisense to help with action names. Example: >ReSharper_ToggleSuspended.
  • Bind a custom keyboard shortcut to the command (Tools :: Customize :: Keyboard). Use the full command name.
  • Drag the command button to the toolbar.
  • Write a macro that executes the action. Example: DTE.ExecuteCommand("ReSharper_ToggleSuspended").

Registry

Between Visual Studio runs, the suspended state flag is persisted in the Registry. This flag is only queried on startup, but any changes to the state are immediately written to the Registry.

  • Registry Hive: HKEY_CURRENT_USER.
  • Registry Key: <ProductRegistryRoot>.
  • Data Name: IsVsPackageEnabled.
  • Data Value: a string representation of the System.Boolean type.

Example:
[HKEY_CURRENT_USER\Software\JetBrains\ReSharper\v5.0\vs10.0]
"IsVsPackageEnabled" = "True"

  • No labels