/// Application framework for .NET
Write the handler.
The build wires the rest.
One [Handler] class becomes a JSON-RPC method, a REST endpoint, and an MCP tool for AI agents — authorized, validated, and traced by a decorator pipeline that Roslyn source generators emit as ordinary C#. No reflection scanning, no startup discovery, no registration lists to drift.
what the build does with it → 01
- .NET 10 · C# 14
- NativeAOT paths
- Zero runtime reflection
- 40+ focused packages
- 1,500+ tests
- Apache-2.0
Attributes in. Ordinary code out.
The generators run inside dotnet build and emit the wiring you would otherwise write and keep in sync by hand. It is code, not container magic — open it, read it, step through it.
- DI registrations with the full decorator pipeline, composed in source.
- Minimal-API route maps and the shared JSON-RPC + MCP operation registry.
- A schema export that becomes a typed TypeScript client.
The DI registration — the decorator pipeline composed in source.
The [HttpEndpoint] route — GET inferred from the IQuery marker.
The exported schema, turned into a typed fetch client with Zod validation.
a.Deterministic startup
The host calls generated registrations. Nothing scans assemblies at run time, so boot behavior is fixed at build time.
b.NativeAOT-ready paths
Emitted code is concrete and statically typed, and JSON serialization is source-generated — supported AOT paths avoid runtime discovery.
c.Reviewable like your own code
Flip EmitCompilerGeneratedFiles and the wiring shows up in code review as plain C# diffs.
Everything an application needs. Nothing you didn't reference.
Each capability is a focused package over seams in Elarion.Abstractions. The core depends on Microsoft.Extensions abstractions and nothing else — Polly, HybridCache, and OpenFeature enter your build the day a handler asks for them, not before.
Wrong wiring doesn't ship.
What the generators wire, they also validate — every mistake becomes a precise diagnostic with a fix direction. Production never finds out.
- A reach into another module is flagged as you type (ELMOD002).
- A route with no inferable verb fails the build, not the demo.
- An authorization gate that can't fail closed is an error, not a hope.
Every diagnostic is documented, from ELRPC001 to ELMOD002 — see the full list.
The first migration deleted 16,223 lines.
Elarion wasn't designed on a whiteboard — it was extracted from a production application that had grown its own foundation: handler pipeline, transports, wiring, caching, the lot. The pull request that moved that application onto the released packages added 391 lines and removed 16,223. The same application came out the other side, minus its plumbing.
a.What the 16,223 were
Bespoke infrastructure — dispatch, registration, caching, retries, auth glue. Code every product rewrites and no product differentiates itself by.
b.What the 391 are
Package references, attributes on the handlers that already existed, and a few registration calls — the declarations the build expands into wiring.
c.Why net −15,832 matters
Every deleted line is one your team no longer reviews, tests, or patches — and one your AI assistants never read, or bill you for, again.
A working handler in three steps.
Step 1 — add the packages
The generators ride along as analyzers — nothing extra to install.
Step 2 — declare one feature
The build now emits
- ✓DI registration + observability pipeline
- ✓GET /ping — minimal API
- ✓system.ping — operation metadata
- ✓source-generated JSON metadata
Step 3 — wire the host
This sample has no hidden database or undeclared dependency: build it and call GET /ping. The quickstart adds JSON-RPC, while the MCP guide exposes the same operation registry to AI agents; the handler and its policy stay unchanged.
The tutorial builds a billing app end to end — modules, authorization, events, and a typed React client.