Show HN: Graphify C# - Compiler-accurate Find Usages for coding agents
Graphify C# - Compiler-Accurate Find Usages for Coding Agents
Introduction
Graphify C# is a free, headless Roslyn/MSBuild indexer that turns C# source into deterministic, queryable semantic evidence: compiler-resolved callers, references, implementations, inheritance, and overrides-even across overloads, generics, and projects. Think of it as the semantic-navigation slice of Rider/ReSharper, exported for Codex, Claude Code, and other coding agents.
How It Works
Graphify C# loads the project through MSBuild and asks Roslyn what every symbol actually means. It emits stable identities and directed relationships that an agent can inspect instead of infer:
| Without semantic indexing | With Graphify C# | |---|---| | Matching names look like usages | Roslyn resolves the exact declaration | | Overloads and generics are ambiguous | Bound signatures and project/TFM identity are retained | | Test-only usage requires manual inspection | Every caller carries project, namespace, and source location | | Type relationships are reconstructed from text | inherits , implements , and overrides are explicit edges |
Example Use Case
For example, this repository contains an internal DeclarationCatalogBuilder.ForTesting() method. From the extracted graph, an agent can see one compiler-resolved incoming call:
Graphify.CSharp.Roslyn.DeclarationCatalogBuilder.ForTesting()
โโโ called by Graphify.CSharp.Tests.Roslyn.CSharp14FeatureTests at tests/Graphify.CSharp.Tests/Roslyn/CSharp14FeatureTests.cs:143
Installation and Usage
To install Graphify C#:
dotnet tool install --global Graphify.CSharp --framework net10.0
To run Graphify C#:
graphify-csharp \
--input ./src/MyProduct.sln \
--root . \
--configuration Release \
--output ./graphify-out/csharp.json
Supported Inputs
Graphify C# supports the following input formats:
.sln.slnx.csproj- SDK file-based
.csapps
Querying the Graph
The resulting JSON document can be queried with jq or consumed by an agent:
jq '.nodes[] | select(.properties.node_kind == "method")' \
graphify-out/csharp.json
Watching for Changes
To start a watcher:
graphify-csharp \
--input ./src/MyProduct.sln \
--root . \
--configuration Release \
--output ./graphify-out/csharp.json \
--watch
Incremental Indexing
Graphify C# supports incremental indexing with an optional warm watcher.
Compatibility
Graphify C# is compatible with the following languages and compiler features:
| Language | Compiler Feature |
|---|---|
| C# | Roslyn 5.9 / C# 14 |
| C# | .NET 11 SDK Roslyn / C# 15 preview |
Tool Assets
Graphify C# contains two tool assets:
| Tool Asset | Runtime | Compiler Surface |
|---|---|---|
| net10.0 | .NET 10 | Roslyn 5.9 / C# 14 |
| net11.0 | .NET 11 | .NET 11 SDK Roslyn / C# 15 preview |
Package Installation
To install or update the package:
dotnet tool update --global Graphify.CSharp --framework net11.0
Boundary of Static Evidence
Graphify C# reports what Roslyn can observe statically. Reflection, dependency injection, native callbacks, dynamic invocation, and code absent from the loaded compilation may create runtime relationships that are not represented as direct edges.
Comments
No comments yet. Start the discussion.