title: Visual Studio: Suppress warnings for all files in a namespace
body: <p>I have following namespaces in my project.</p>
  
  <p><a href="https://i.stack.imgur.com/AbNxx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/AbNxx.png" alt="enter image description here"></a></p>
  
  <p>I want to disable a specific warning on a specific namespace (lets say Project.ViewModels). I can disable a warning on one files by doing this in the <code>GlobalSuppression.cs</code></p>
  
  <pre><code>[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Formatting", "RCS1057:Add empty line between declarations.", Justification = "&lt;Pending&gt;", Scope = "type", Target = "~T:Project.ViewModels.MainViewModel.cs")]
  [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Formatting", "RCS1057:Add empty line between declarations.", Justification = "&lt;Pending&gt;", Scope = "type", Target = "~T:Project.ViewModels.TreeViewModel.cs")]
  </code></pre>
  
  <p>I tried to change <code>Scope</code> from <code>type</code> to <code>namespace</code> and <code>namespaceanddescendants</code> but it didn't work. </p>
  
  <pre><code>[assembly: SuppressMessage("Formatting", "RCS1057:Add empty line between declarations.", Justification = "&lt;Pending&gt;", Scope = "namespace", Target = "~T:Project.ViewModels")]
  </code></pre>
  
  <p>Any idea how this can be fixed? I am using Visual Studio 2017.</p>