DEV Community

Bharat Dwarkani
Bharat Dwarkani

Posted on

Top 10 Static Code Quality Analysers for ASP.NET Core


Created by Microsoft, a set of analyzers, called Microsoft.CodeAnalysis.FxCopAnalyzers, that contains the most important "FxCop" rules from static code analysis, converted to Roslyn analyzers. These analyzers check your code for security, performance, and design issues, among others.

You can install these FxCop analyzers either as a NuGet package or as a VSIX extension to Visual Studio.


An implementation of StyleCop rules using the .NET Compiler Platform. It helps in enforcing standard style for code.

Security Code Scan

Detects various security vulnerability patterns: SQL Injection, Cross-Site Scripting (XSS), Cross-Site Request Forgery (CSRF), XML eXternal Entity Injection (XXE), etc.

Web API analyzers

ASP.NET Core 2.2 and later includes the Microsoft.AspNetCore.Mvc.Api.Analyzers NuGet package containing analyzers for web APIs.


Analyzers which spot bugs and code smells in your code.


When using dependency injection and async-await pattern it is possible to end up with an interface with a method that returns a Task. If this interface method is used in a synchronous method there is a likelihood that it will erroneously be run like a fire and forget method. In this situation, this analyzer generates a warning.


Provides diagnostic analyzers to warn about incorrect usage of NSubstitute in C#. [Code Analyzers]

Code Analyzers for projects using that help finds and fix frequent issues when writing tests.


CodeQuality Analyzers


Microsoft.CodeAnalysis Version Check Analyzer

Few more analyzers -

Top comments (0)