visual-studio 禁用但不卸载 Resharper 4.x 以上
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/253063/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Disable, but not uninstall Resharper 4.x onwards
提问by Graviton
Any ideas on how to disable, but not uninstall Resharper 4.x or above?
关于如何禁用但不卸载 Resharper 4.x 或更高版本的任何想法?
回答by Cherian
The accepted answer does not work from resharper 5 onwards. You should suspend ReSharper from the Tools > Options > Resharper
从 resharper 5 开始,接受的答案不起作用。您应该从工具 > 选项 > Resharper 暂停 ReSharper


回答by Rytmis
You can disable ReSharper 4 and lower using the Visual Studio Add-In Manager (remove the check from check box on the left).
您可以使用 Visual Studio 插件管理器禁用 ReSharper 4 及更低版本(从左侧的复选框中取消选中)。
In ReSharper 5 and above (tested up to version 7.0.1), this is how you can suspendReSharper from the Tools > Options > Resharper

在 ReSharper 5 及更高版本(测试到版本 7.0.1)中,这是您如何从工具 > 选项 > Resharper暂停ReSharper

回答by Oscar Mederos
If you want to do it without clicking too much, open the Command Window(Ctrl+ W, A) and type:
如果您不想点击太多,请打开命令行窗口(Ctrl+ W, A)并键入:
ReSharper_Suspendor ReSharper_Resumedepending on what you want.
ReSharper_Suspend或ReSharper_Resume取决于你想要什么。
Or you can event set a keyboard shortcut for this purpose. In VS, go to Tools > Options > Environment > Keyboard.
或者您可以为此目的设置键盘快捷键。在VS 中,转到“工具”>“选项”>“环境”>“键盘”。
There you can assign a keyboard shortcut to ReSharper_Suspendand ReSharper_Resume.
在那里,您可以为ReSharper_Suspend和分配键盘快捷键ReSharper_Resume。
回答by mackenir
This didn't work for me. The checkbox in the Startup column was both checked and disabled.
这对我不起作用。Startup 列中的复选框被选中和禁用。
BUT!I found a fix elsewhere on the web.
但!我在网上的其他地方找到了修复程序。
What you need to do is make the following file(s) writeable:
您需要做的是使以下文件可写:
C:\Program Files\JetBrains\ReSharper\v4.0\Bin\Product.VisualStudio.80.AddIn
C:\Program Files\JetBrains\ReSharper\v4.0\Bin\Product.VisualStudio.90.AddIn
C:\Program Files\JetBrains\ReSharper\v4.0\Bin\Product.VisualStudio.80.AddIn
C:\Program Files\JetBrains\ReSharper\v4.0\Bin\Product.VisualStudio.90.AddIn
Because these files were read-only, VS200x was unable to modify them to set the startup enabledness of the Resharper addin.
因为这些文件是只读的,VS200x 无法修改它们来设置 Resharper 插件的启动能力。
回答by valdetero
For Visual Studio 2012 and Resharper 7+, create a shortcut for Visual Studio and add the following switch:
对于 Visual Studio 2012 和 Resharper 7+,为 Visual Studio 创建一个快捷方式并添加以下开关:
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /Resharper.Suspend
Now you have a way to have Visual Studio open with Resharper already disabled.
现在,您可以在禁用 Resharper 的情况下打开 Visual Studio。
回答by Fred Morrison
ReSharper 6.1.1 no longer includes ReSharper_Resume or ReSharper_Suspend (or at least I cannot find them to add them to a toolbar). The previously mentioned keyboard short-cuts (Ctrl+8 or Ctrl+Shift+Alt+8 don't work either).
ReSharper 6.1.1 不再包含 ReSharper_Resume 或 ReSharper_Suspend(或者至少我找不到它们来将它们添加到工具栏)。前面提到的键盘快捷键(Ctrl+8 或 Ctrl+Shift+Alt+8 也不起作用)。
As a work-around, you can use Tools/Option/ReSharper and click the Suspend button. You do have to go back to that location to resume ReSharper 6.1.1 after you suspend it.
作为变通方法,您可以使用工具/选项/ReSharper 并单击暂停按钮。挂起 ReSharper 6.1.1 后,您必须返回该位置以恢复它。
The main reason to suspend ReSharper 6.1.1 is that it is guaranteed to crash Visual Studio 2008 SP1 when editing nAnt files (large or small, makes no difference). Those files typically have a file extension of .build.
暂停 ReSharper 6.1.1 的主要原因是它在编辑 nAnt 文件(大或小,没有区别)时肯定会导致 Visual Studio 2008 SP1 崩溃。这些文件通常具有 .build 的文件扩展名。
回答by aponzani
In ReSharper 5.0, the keyboard shortcut to temporarily enable/disable code analysis for the current file is Ctrl+Shift+Alt+8. It was Ctrl+8in previous versions.
在 ReSharper 5.0 中,临时启用/禁用当前文件的代码分析的键盘快捷键是Ctrl+ Shift+ Alt+ 8。在以前的版本中它是Ctrl+ 8。
回答by craigb
On Win7, open VS as admin, and the .AddIn file will be writable. (the checkbox will be active)
在 Win7 上,以管理员身份打开 VS,.AddIn 文件将是可写的。(复选框将处于活动状态)
回答by SLaks
You can also press Ctrl+8.
您也可以按 Ctrl+8。
回答by Ben Newcomb
I only need to disable ReSharper when editing Nant files. It was recently "enhanced" in 6.1 and has since broken the existing intellisense provided by Visual Studio. Instead of worrying about dancing around enabling and disabling, I decided to create a batch file that loads my Nant solution but loads VS in safe mode. Seems be to working great as I'm using VS for nothing more than a fancy text editor when it comes to Nant.
我只需要在编辑 Nant 文件时禁用 ReSharper。它最近在 6.1 中得到了“增强”,并打破了 Visual Studio 提供的现有智能感知。与其担心启用和禁用,我决定创建一个批处理文件,该文件加载我的 Nant 解决方案,但在安全模式下加载 VS。似乎工作得很好,因为当涉及到 Nant 时,我使用 VS 只不过是一个花哨的文本编辑器。
Example: Put the following in a text file saved as a bat or cmd.
示例:将以下内容放入保存为 bat 或 cmd 的文本文件中。
My file: "nantbuild.cmd"
我的文件:“nantbuild.cmd”
devenv psbuild.sln /safemode

