Disable Resharper with comment

2019-06-27 04:53发布

问题:

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?

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

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

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

回答1:

RESharper - Options

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

Disables warning.



回答2:

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.