Disable Resharper with comment

走远了吗. 提交于 2020-01-03 17:48:12

问题


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.



来源:https://stackoverflow.com/questions/3517278/disable-resharper-with-comment

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