Visual studio 2017 如何避免在visual studio 2017 15.9.13中添加此或me资格问题

Visual studio 2017 如何避免在visual studio 2017 15.9.13中添加此或me资格问题,visual-studio-2017,Visual Studio 2017,我们如何解决以下错误。在以前的VisualStudio版本中,相同的代码可以正常工作,没有任何错误。只有在升级后,我才会出现此错误。不可能将“this”添加到整个大型解决方案的所有属性中。因此,我们要避免这一错误,还有什么容易的办法 对编辑器配置文件进行了更改,它开始工作 # Remove the line below if you want to inherit .editorconfig settings from higher directories root = true # C#

我们如何解决以下错误。在以前的VisualStudio版本中,相同的代码可以正常工作,没有任何错误。只有在升级后,我才会出现此错误。不可能将“this”添加到整个大型解决方案的所有属性中。因此,我们要避免这一错误,还有什么容易的办法


对编辑器配置文件进行了更改,它开始工作

# Remove the line below if you want to inherit .editorconfig settings from higher 
directories
root = true

# C# files
[*.cs]

# this. and Me. preferences
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent

我正在使用Resharper,发现Visual Studio(2019)在代码完成时添加了
this
限定符,这将触发Resharper的
删除冗余的“this”限定符建议

由于某些原因,通过gui(重塑器或Visual Studio设置)更新这些设置没有任何效果。然而,更新
.editorconfig
对我来说立即奏效。谢谢@Deepak

  • 禁止添加
    限定符的建议和代码完成
  • 要强制设置为true,请选择所需的严重性。
    true:warning
    true:error

请参阅导致问题的代码是什么?这是一个错误还是仅仅是某种建议?实际的错误是什么?您是否尝试按建议添加
(C#)或
(VB)?@David添加此后,效果良好。但无法将其添加到解决方案中的所有900个文件中。
# "This." and "Me." qualifiers
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion