How can I disable ReSharper in Visual Studio and enable it again?

167,587

Solution 1

You can disable ReSharper 5 and newer versions by using the Suspend Now button in menu ToolsOptionsReSharper.

enter image description here

Solution 2

If you want to do it without clicking too much, open the Command Window (Ctrl + W, A) and type:

ReSharper_Suspend or ReSharper_Resume depending on what you want.

Or you can even set a keyboard shortcut for this purpose. In Visual Studio, go to Tools -> Options -> Environment -> Keyboard.

There you can assign a keyboard shortcut to ReSharper_Suspend and ReSharper_Resume.

The Command Window can also be opened with Ctrl + Alt + A, just in case you're in the editor.

Enter image description here

Solution 3

Bind ReSharper_ToggleSuspended to a shortcut key.

Steps:

  1. Tools>Options
  2. Click Keyboard on the left hand side
  3. Type "suspend" in the "Show commands containing:" input box
  4. Pick the "ReSharper_ToggleSuspended"
  5. Press shortcut keys: and
  6. Press the "Assign" button.

Binding ReSharper_ToggleSuspended to a shortcut key (in my case: Ctrl-Shift-Q) works very well. With ReSharper not supporting the async CTP yet (as of mid-2011), when dipping into the code the uses the async keyword, this shortcut is invaluable.

Solution 4

I always forget how to do this and this is the top result on Google. IMO, none of the answers here are satisfactory.
So the next time I search this and to help others, here's how to do it and what the button looks like to toggle it:

Toggle Resharper Toolbar Button

  • Make sure Resharper is currently enabled or the commands may fail.
  • Open package manager console via the Quick Launch bar near the caption buttons to launch a PowerShell instance.
  • Enter the code below into the Package Manager Console Powershell instance:

If you want to add it to the standard toolbar:

$cmdBar = $dte.CommandBars.Item("Standard") 
$cmd = $dte.Commands.Item("ReSharper_ToggleSuspended")
$ctrl = $cmd.AddControl($cmdBar, $cmdBar.Controls.Count+1)
$ctrl.Caption = "R#"

If you want to add it to a new custom toolbar:

$toolbarType = [EnvDTE.vsCommandBarType]::vsCommandBarTypeToolbar
$cmdBar = $dte.Commands.AddCommandBar("Resharper", $toolbarType)
$cmd = $dte.Commands.Item("ReSharper_ToggleSuspended")
$ctrl = $cmd.AddControl($cmdBar, $cmdBar.Controls.Count+1)
$ctrl.Caption = "R#"

If you mess up and need to start over, remove it with:

$ctrl.Delete($cmdBar)
$dte.Commands.RemoveCommandBar($cmdBar)

In addition to adding the button, you may wish to add the keyboard shortcut
ctrl+shift+Num -, ctrl+shift+Num - that is: ctrl+shift+-+-

EDIT: Looks like StingyJack found the original post I found long ago. It never shows up when I do a google search for this
https://stackoverflow.com/a/41792417/16391

Solution 5

If resharper is completely missing from the options menu, it could be because the extension itself has been disabled.

In Visual Studio 2017 ReSharper 2018.X.X can be enabled and disabled by going to Help > Manage Visual Studio Performance. Then select JetBrains ReSharper ... under Extensions.

enter image description here

In Visual Studio 2019, you would go under Extensions->Manage Extensions->Installed

Share:
167,587
ali62b
Author by

ali62b

Ali E.Bastani was born at 19/02/1984 in Tehran , Iran . He’s got his BS from IAU (Islamic Azad University) in “Computer Software Engineering” at 2005 . His Thesis was about Data Mining and specifically using Data Mining tools of SQL Server 2005 and developing a demo program in C#.NET using these tools. He took some courses in APTECH Iran about Web designing and Database designing and also C# and Java programming in 2006. These courses was held in SUT (Sharif University of Technology) and took about one year long. He was working as a Web Developer for two local company (PSA & Hafekran IT) during 2007 and 2008. He was employed by Bank Melli Iran (the greatest Islamic bank in world) as IT Expert in 2009. He is developing with ASP.NET (C#) and uses SQL Server as Database . His research interests are LINQ and ASP.NET MVC and has read some books in these subjects.

Updated on July 08, 2022

Comments

  • ali62b
    ali62b almost 2 years

    I installed ReSharper, and it works in Visual Studio, but how can I disable it?

    Whenever I search in the ReSharper menu, I can't find a disable option.

  • holtavolt
    holtavolt over 11 years
    I find this the most practical of the solutions posted for temporarily suspending ReSharper (and it's easy to see the current state by the presence/absence of the ReSharper menu bar entry). One notable case is when switching solution configurations for reasonably large (> 50 project) solutions. This operations is approx 10x slower with ReSharper enabled (252 seconds vs. 25 seconds without). It is very handy to be able to toggle ReSharper off temporarily for tweaking project settings, then re-enable, without requiring reloading or option menu drilling.
  • default
    default about 11 years
    Command Window for me is bound to Ctrl alt A. That might be because Re# has bound the Ctrl W to Extend selection
  • Ajay
    Ajay almost 10 years
    Any option to disable it completely. It conflicts with keyboard. I don't want to do any changes with ReSharper - just disable, not suspend. Suspend keeps the shortcut to itself!
  • RayLoveless
    RayLoveless over 9 years
    Thanks. It's sad but I have to disable every time i'm working html and .aspx pages.
  • SZT
    SZT about 9 years
    I like this toggling option. Sometimes, when I type re# slows me down big time. I thought disabling would help me type faster. But when I enabled it back it takes so long to load that ultimately it slows me down even more :( now I'm learning to live with slow typing :(
  • Martin
    Martin about 9 years
    I found I need to disable it for TypeScript -- it just gets everything wrong.
  • ranieuwe
    ranieuwe over 7 years
    As also mentioned in other answers: there is also a hotkey called ReSharper_ToggleSuspended which allows you to use one HotKey to switch between suspended and resume.
  • Hrvoje Hudo
    Hrvoje Hudo about 7 years
    How to add a macro in VS2017?
  • Styxxy
    Styxxy over 6 years
    @HrvojeHudo Macros don't exist anymore in VS2017.
  • Alex Sanséau
    Alex Sanséau over 6 years
    It still works via Tools -> Options -> ReSharper (VS2015, ReSpharper 2017.2.2), which is where you have to go to if you want to enable it again. (ReSpharper->options-> Product and features won't be available after ReSharper has been disabled)
  • Derek Ziemba
    Derek Ziemba about 6 years
    Thanks for the link. I absolutely could not re-find that when I was trying to re-figure this out and had to recreate it from memory + trial and error.
  • StingyJack
    StingyJack about 6 years
    I can never find the post without tooling around for several minutes either, so I added it to a bunch of posh scripts that I can find github.com/StingyJack/Vs-Utility/blob/master/…
  • cdiazal
    cdiazal over 4 years
    Best solution IMO
  • Samuel
    Samuel about 4 years
    Best solution, but be aware that at least the first command group will fail if r# is currently not enabled!
  • g.pickardou
    g.pickardou over 3 years
    This one of the greatest answer ever, not only for this question, but in general. No talk, just code, and it works. Thanks!
  • mickeymicks
    mickeymicks almost 3 years
    Exactly what I was looking for, and can confirm that it works VS2019 and Resharper 2020.X! Thank you! Now, I just need to know how to enable/disable xaml designer via commandline as well.
  • Patrick Knott
    Patrick Knott almost 3 years
    Precisely, you may be looking for Resharper... but look for JetBrains, that is how you can reenable it if you suspended it and can't find it again... It is also how you can disable it instead of suspending it.