简体   繁体   English

重命名字段时如何禁用Visual Studio 2015灯泡?

[英]How do I disable Visual Studio 2015 lightbulb when renaming a field?

I've done everything listed in this answer: https://stackoverflow.com/a/31614259/602114 , but the lightbulb still pops up whenever I rename a private field, in this case from db to _db : 我已经完成了这个答案中列出的所有内容: https_db ,但每当我重命名私有字段时,灯泡仍会弹出,在本例中是从db_db

灯泡

Clicking on the lighbulb suggests performing "rename" refactor action. 点击灯泡建议执行“重命名”重构操作。

重构建议

However that's exactly what I've just done using ReSharper! 然而,这正是我刚刚使用ReSharper所做的! This suggestion pops up every time I rename a field that does not have any references, and when I perform ReSharper refactor action, making it completely redundant. 每次重命名没有任何引用的字段时,都会弹出此建议,当我执行ReSharper重构操作时,会使其完全冗余。

Is there any way to turn it off? 有没有办法把它关掉?

In order to suppress the VS lightbulb via ReSharper, you need to go to: 要通过ReSharper抑制VS灯泡,您需要转到:

ReSharper -> Tools -> Code Inspection (make sure Enable code analysis is checked), and then click the Do not show VS lightbulb . ReSharper - >工具 - >代码检查(确保选中“启用代码分析”),然后单击“不显示VS灯泡” Note this will suppress the lightbulb completely (which is redundant anyway if you use R#). 请注意,这将完全抑制灯泡(如果使用R#,则无论如何都是多余的)。

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM