BrandGhost
← Back to Language Features

Roslyn Analyzers

Custom Roslyn analyzers and code fixes in C# -- diagnostic rules, code analysis APIs, and distributing analyzers as NuGet packages.

Articles

Testing Roslyn Analyzers with Microsoft.CodeAnalysis.Testing in C#

Testing Roslyn Analyzers with Microsoft.CodeAnalysis.Testing in C#

Master testing Roslyn analyzers using Microsoft.CodeAnalysis.Testing in C#. Learn NuGet setup, diagnostic markers, code fix testing, and CI integration.

Read the whole article

IOperation vs SyntaxNode vs Symbol in Roslyn: Choosing the Right Analysis API

IOperation vs SyntaxNode vs Symbol in Roslyn: Choosing the Right Analysis API

Learn when to use IOperation Roslyn vs SyntaxNode vs Symbol APIs. Compare the three analysis layers to pick the right one for your C# analyzer in .NET 10.

Read the whole article

DiagnosticDescriptor in C#: Configuring Rule IDs, Severity, and Diagnostic Messages

Master DiagnosticDescriptor C# configuration -- rule IDs, severity levels, .editorconfig overrides, and diagnostic messages for your Roslyn analyzers.

Read the whole article

Distributing Roslyn Analyzers as NuGet Packages in .NET

Distributing Roslyn Analyzers as NuGet Packages in .NET

Learn to package and distribute your roslyn analyzer nuget package with the right folder structure, metadata, versioning, and CI/CD automation in .NET 10.

Read the whole article

Build Your First Roslyn Analyzer in C#: Diagnostics and Code Fix Walkthrough

Build Your First Roslyn Analyzer in C#: Diagnostics and Code Fix Walkthrough

Build roslyn analyzer c# from scratch -- complete project setup, DiagnosticAnalyzer scaffold, CodeFixProvider implementation, debugging, and unit tests.

Read the whole article

An error has occurred. This application may no longer respond until reloaded. Reload