visual-studioroslynroslyn-code-analysis

Suppressing issues from Roslyn code Analyzers


Is there any way to suppress the issues from the Roslyn Analyzers? I use the instant analyzer project type. And I want to suppress the issues if the user wants it. Also it must be permanent. If I reopen Visual Studio, the same suppression rules must still be applied.


Solution

  • You can ignore warnings/errors from Roslyn analyzers in exactly the same ways as ignoring normal C# compiler warnings: