Skip to content

Roslyn semantic analysis

The compiler-grade symbol resolution Roslyn produces for C# code — type, binding, and reference information that AI agents can use as ground truth instead of guessing from text.

Roslyn is the open-source .NET compiler. Its semantic model answers questions tree-sitter cannot: what type is this expression, what does this identifier bind to, what calls this method? For an AI agent operating on a C# codebase, this is the difference between editing what the symbol looks like and editing what the symbol is.

Placeholder body. Replace with the full glossary entry per playbook §9 — include the two-paragraph SemanticModel.GetSymbolInfo example and the comparison to tree-sitter.

When it matters

  • Cross-file rename or extraction where text-based search misses overloads.
  • Verifying that an inferred call target actually exists before the agent writes a plan that depends on it.
  • Powering an MCP server that exposes type lookups to the agent so it does not have to re-derive them from grep.

Related terms