C# change impact analysis with Roslyn
What breaks if you change this symbol? Impact analysis answers that before the edit. It follows the real references in a C#/.NET solution, as the compiler resolves them, instead of searching for matching text.
impact_of_change on GitHub ↗Roslyn MCP serverAICB overviewThe documentation on GitHub is authoritative and current. This page explains the idea and links to it.
Why a green build is not enough
The compiler checks names
A changed default value or a new enum member can compile cleanly and still break code that assumed the old behaviour, such as a non-exhaustive switch statement.
Text search finds strings
It misses calls through an interface or a base class, and it mixes up overloads and unrelated types that share a name.
An agent sees what it has read
A coding agent that has opened three files knows nothing about the fourth one that depends on them. Impact analysis names that file before the edit.
What change impact analysis follows
- Direct users - the code that names the symbol
- Transitive users - the code that depends on those users
- Interfaces and abstract members - calls through a contract and the types that implement it
- Tests -
find_tests_fornames the tests that reach a symbol - Dependency injection -
resolve_injectionshows what is registered - XAML bindings -
find_binding_usageslists the sites in the markup
Example: what depends on an interface?
Abridged output of AICB 0.5.530.1 on the sample solution ColorMixer.SelectionLab.
A safer edit workflow for coding agents
- Check the impact
- Find the tests
- Edit
- Refresh and check diagnostics
- Review
The matching tools, in order: impact_of_change, find_tests_for, your agent's edit, refresh_session with get_diagnostics, and review_context.
Where static impact analysis stops
- Reflection and runtime paths - code reached only through reflection or a path assembled at runtime is not visible
- Registration by convention - assembly scans and non-Microsoft containers are not read
- Other languages - callers in VB or F# code are not included
- The meaning of a change - the result shows what depends on a symbol, not whether your change is correct
An empty result is a reason to check, not proof that nothing depends on the symbol.
Try it on your own solution
You need the .NET 10 SDK. Install AICB, set up your agent and ask: what could be affected if I change this symbol?
dotnet tool install -g aicb-roslyn-mcp
aicb init
Quick start on GitHub ↗Roslyn MCP server: tools and setup
Questions about using it in your team? Send an enquiry