Disable Resharper with comment

2019-06-27 04:51发布

Edit: Problem is solved by updating.


Resharper is really annoying me and marking code that is 100% correct as wrong, it keeps wanting me to change an Action to an Action<T1,T2...Tn> when this obviously incorrect. It flashes everytime I type something so is really distracting. Is there a way to disable resharper totally inbetween two comments? Or how do you disable only for this warning?

alt text

Edit: There is no hint on the left to disable this using comments.

The menu that pops up when you press Alt+Return:

alt text

Edit: I found a solution, just wrap the offending lines of code in #region RFail and #endregion statements. Not ideal though.

2条回答
家丑人穷心不美
2楼-- · 2019-06-27 05:27

If you click the context menu that ReSharper pops up at the left edge of the editor window, it should offer you the option to either wrap the offending code in a suitable comment or adjust the setting for that kind of alert.

查看更多
混吃等死
3楼-- · 2019-06-27 05:37

RESharper - Options

  • Code Inspection
  • Settings
  • Uncheck (Show the "Import namespace" action using popup)

Disables warning.

查看更多
登录 后发表回答