Is there a way to disable ReSharper for a specific file?

安稳与你 提交于 2019-11-28 17:43:14

In order to skip inspections in some files or folders go to ReSharper | Options | Code Inspection | Settings -> Edit Items to Skip button. Or if your code is generated add it to appropriate list in ReSharper | Options | Generate Code section. You can read more about how it works here.

Drew Noakes

You can apply this to individual files via a shortcut key.

With the file open try both of these (the actual shortcut depends upon your environment).

  • Ctrl + Shift + Alt + 8
  • Ctrl + 8

You will see that it toggles the processing of this specific file.

The name of this shortcut in the Keyboard dialog is ReSharper_EnableDaemon.

Eli Algranti

This may be a feature in a more recent version than the one available when the question was originally asked.

It is possible to suppress code inspection for a specific block (or file) by using the comments:

// ReSharper disable All 

and

// ReSharper restore All

See here.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!