我想抑制这些警告,但我无法弄清楚如何做到这一点.

我的项目中有以下命名空间。
我想禁用特定命名空间上的特定警告(比如 Project.ViewModels)。我可以通过在GlobalSuppression.cs
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Formatting", "RCS1057:Add empty line between declarations.", Justification = "<Pending>", Scope = "type", Target = "~T:Project.ViewModels.MainViewModel.cs")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Formatting", "RCS1057:Add empty line between declarations.", Justification = "<Pending>", Scope = "type", Target = "~T:Project.ViewModels.TreeViewModel.cs")]
Run Code Online (Sandbox Code Playgroud)
我试图Scope从type改为namespace,namespaceanddescendants但没有奏效。
[assembly: SuppressMessage("Formatting", "RCS1057:Add empty line between declarations.", Justification = "<Pending>", Scope = "namespace", Target = "~T:Project.ViewModels")]
Run Code Online (Sandbox Code Playgroud)
知道如何解决这个问题吗?我正在使用 Visual Studio 2017。