Skip to content

Roslyn Code Analysis

Compilation & Diagnostics

Loads projects via MSBuild workspace. Provides project-wide and per-file error/warning analysis.

  • Uses MSBuildWorkspace for solution loading
  • Caches compilation results for performance
  • Reports diagnostics (errors, warnings, suggestions) per file
  • Supports .NET Framework, .NET Core, .NET 5+ projects

Architecture Overview

Compressed namespace → class map for AI reasoning. Syntax classification for token-level highlighting.

  • Extracts type hierarchy (classes, interfaces, structs, enums)
  • Method/property signatures with accessibility
  • Dependency graph between types
  • Symbol extraction for RAG context injection

Blast Radius

Finds all references to a symbol across the solution for impact analysis before refactoring.

  • Uses Roslyn FindReferencesAsync
  • Groups by file and type (read/write/reference)
  • Filters test files vs production code
  • Exports as markdown report for agent consumption