Cannot suppress certain warning globally

463 views Asked by At

I have VS2013 with Code Analysis turned on. I want to suppress one type of message globally, so I have following code in GlobalSuppressions.cs

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope = "namespace", Target = "MyProject.MyNamespace")]

But my function name contains underscore still got warned/errored by VS.

[TestMethod()]
public void Do_Something_Successfully_Test()
{
}

Any idea why?

0

There are 0 answers