Top 10 Static Code Quality Analysers for ASP.NET Core

Bharat Dwarkani
2 min readAug 8, 2019


Static Analysers are great to enforce code quality and style guides in projects. Most analyzers just provide option to fix on click automatically.

Sample project with Analyzers included along with Cake Build Script can be found in GitHub


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.

Roslynator 2019

A collection of 500+ analyzers, refactorings, and fixes for C#, powered by Roslyn.


AsyncFixer helps developers in finding and correcting common async/await misuses (anti-patterns). AsyncFixer was tested with hundreds of open-source C# apps and successfully handles many corner cases. Here are anti-patterns that AsyncFixer can detect:

Nugget —

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.


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

If you are interested in more resources related to ASP.NET Core check out my site



Bharat Dwarkani

Tech Enthusiast, Full Stack Software Engineer, Product Manager, Engineering Enterprise SaaS product