Map the solution deterministically
Codna resolves projects, namespaces, async call paths, DI registrations, and NuGet references into a dependency and blast-radius graph — in milliseconds, for zero LLM tokens.
Generics, async/await, and deep namespaces scatter a C# bug across projects and NuGet packages. Codna is an AI C# pair programmer that builds the dependency and blast-radius graph deterministically, so the fix starts from facts, not guesses.
The problem
A single failing xUnit test in a .NET solution can trace back through an awaited call chain, a generic constraint, an interface implementation registered in DI, or a transitive NuGet dependency in another project. AI C# debugging usually means pasting files into a chat and hoping the model guessed the right one — but the real cause sits behind a re-export or a partial class the test never names. Reading a whole multi-project solution into a model is slow, lossy, and burns six figures of tokens before a line is even edited. That is where engineers lose hours: not writing the fix, but reconstructing the call graph by hand to find where it belongs.
How Codna fixes it
Codna resolves projects, namespaces, async call paths, DI registrations, and NuGet references into a dependency and blast-radius graph — in milliseconds, for zero LLM tokens.
The agent receives the failing test, the awaited call chain, and the suspect types — about 600 tokens, roughly 162x less context than reading the solution.
Codna re-runs your xUnit, NUnit, or MSTest suite and ships the patch only when it passes — a typical verified fix costs about $0.04.
dotnet tool install -g codna\ncodna fix . --issue "OrderService.ProcessAsync deadlocks under load (xUnit: ProcessAsync_ConcurrentOrders_Completes fails)"
What you get
Codna resolves namespaces, async call paths, and cross-project NuGet references into a dependency graph for zero LLM tokens — no RAG, no embeddings, no guessing which file matters.
The agent fixes from a focused bundle of the failing test, call chain, and suspect types — about 162x less context than feeding it the whole solution.
The patch ships only after your existing xUnit, NUnit, or MSTest suite goes green, so a verified c# ai bug fix lands for roughly $0.04, not a blind diff.
The proof
Codna maps your projects, namespaces, async call paths, and NuGet dependencies into a deterministic graph first, then hands the agent a ~600-token evidence bundle — the failing test, the call chain, and the suspect types. It fixes from facts instead of loading the entire solution into a model.
Yes. Codna verifies every fix against your existing test runner — xUnit, NUnit, or MSTest — and the failing test is the oracle. The patch only ships when your suite passes.
Yes. The deterministic graph resolves awaited call chains and generic constraints, so the agent fixes the actual cause rather than patching a symptom downstream.
Yes. Codna maps cross-project references and transitive package dependencies, so a fix accounts for its blast radius across the whole solution, not just one file.
Install the CLI with dotnet tool install -g codna and run codna fix on your repo, or use the MCP server inside Cursor or Claude and the native GitHub App. The same deterministic engine backs all three.
Yes. Codna supports self-hosting with bring-your-own-key, fail-closed egress, and no training on your code, so a proprietary .NET solution never leaves your control.
Related