Cratis.Arc.Chronicle.CodeAnalysis 22.168.0

Prefix Reserved
dotnet add package Cratis.Arc.Chronicle.CodeAnalysis --version 22.168.0
                    
NuGet\Install-Package Cratis.Arc.Chronicle.CodeAnalysis -Version 22.168.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cratis.Arc.Chronicle.CodeAnalysis" Version="22.168.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cratis.Arc.Chronicle.CodeAnalysis" Version="22.168.0" />
                    
Directory.Packages.props
<PackageReference Include="Cratis.Arc.Chronicle.CodeAnalysis">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cratis.Arc.Chronicle.CodeAnalysis --version 22.168.0
                    
#r "nuget: Cratis.Arc.Chronicle.CodeAnalysis, 22.168.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Cratis.Arc.Chronicle.CodeAnalysis@22.168.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Cratis.Arc.Chronicle.CodeAnalysis&version=22.168.0
                    
Install as a Cake Addin
#tool nuget:?package=Cratis.Arc.Chronicle.CodeAnalysis&version=22.168.0
                    
Install as a Cake Tool

title: "Cratis Arc: CQRS framework for ASP.NET Core" description: Cratis Arc is a CQRS framework for ASP.NET Core that exposes commands and queries over HTTP and generates TypeScript clients, without requiring event sourcing.

<a id="cratis-arc"></a>

Cratis Arc: CQRS framework for ASP.NET Core

Cratis Arc is an open-source (MIT) CQRS application framework for ASP.NET Core. CQRS separates requests to change something (commands) from requests to read it (queries). Arc exposes those contracts over HTTP, handles validation and authorization, and generates TypeScript clients for the frontend. It works with current-state storage or optional Cratis Chronicle event sourcing.

Build a feature as a vertical slice: keep its command, read model, query, frontend, and specs together. The backend defines the contracts; generated TypeScript proxies carry them into the frontend without a hand-written API client for those contracts. Observable queries let a screen subscribe to results as they change, with a configured observation source.

Choose the packages your feature needs. Arc includes identity and tenancy, React integration, MongoDB and Entity Framework Core adapters, OpenAPI, analyzers, and testing helpers. Chronicle event sourcing and Cratis Components are optional integrations. Free AI skills provide guidance for building with the stack.

NuGet NPM .NET Build JavaScript Build

Start here

What Arc owns

Boundary Arc provides
Hosting ASP.NET Core hosting plus an Arc.Core HTTP host for workers, consoles, and custom services
Commands Model-bound and controller-based execution, validation, authorization, filters, scopes, typed results, and generated endpoints
Queries Model-bound and controller-based reads, paging and sorting, observable updates, WebSocket or Server-Sent Events transport, and query diagnostics
Validation Data annotations, FluentValidation, concept/command/query validators, generated client rules, and optional server preflight from React forms
Identity and tenancy Pluggable authentication, identity details, role-based authorization, and header, query, claim, subdomain, fixed, or development tenant resolution
Generated contracts TypeScript proxies, referenced types, validation metadata, identity details, incremental output cleanup, and package/type mapping
Frontend packages TypeScript command/query runtimes, React hooks and forms, dialogs, observable-query composition, and optional React/MVVM integration
Persistence integration MongoDB and Entity Framework Core current-state adapters plus optional Chronicle-backed event-sourced behavior
Evaluation and tooling OpenAPI, runtime introspection, analyzers, source generators, command scenarios, proxy-generation checks, Vite helpers, and ESLint rules

Use this table to find the capability you need, then check its package and documentation for your host, provider, browser, and versions. The rows do not establish compatibility for every combination.

Choose a path

Arc documentation is organized around the job you need to complete:

For a first feature, start the host below, then follow the command and query guides. If you already have an application, choose the path for the part you want Arc to handle.

Arc does not require event sourcing

Arc.Core does not depend on Chronicle. A command can call an application service or write current state to a database; a query can read that state without an event log.

Choose the optional Chronicle integration when you want to record events and derive state from them. Arc still handles commands, queries, validation, authorization, and generated frontend contracts.

Chronicle is Cratis's storage-agnostic event-sourcing database and runtime — MIT licensed and free to use; see the Chronicle documentation for its own scope and setup.

Relationship to Components

Components is a React component library aligned with Arc application patterns. See the Components documentation for its packages and setup.

Applications may use Arc without Components and remain responsible for their own frontend, accessibility, browser, and design-system verification.

Start an Arc host

Arc's .NET packages embed this product-family README. The example below uses the Cratis.Arc package, Arc's ASP.NET Core integration; when viewing this README from a specialized package page, use that package's manifest and reference documentation for its own installation scope.

Use the .NET SDK declared by Arc's current global.json. Create an ASP.NET Core project and install the package:

dotnet new web -n MyApp
cd MyApp
dotnet add package Cratis.Arc

Replace Program.cs and run the host:

var builder = WebApplication.CreateBuilder(args);
builder.AddCratisArc();

var app = builder.Build();
app.UseCratisArc();
await app.RunAsync();

Starting the host confirms the basic Arc setup. For workers, consoles, or services without ASP.NET Core, the lightweight host is ArcApplication.CreateBuilder(args) from the separate Cratis.Arc.Core package; do not combine it with Cratis.Arc, whose ASP.NET Core services it does not register. See getting started with the lightweight host. Continue with the Arc documentation, and use GitHub Issues when the observed behavior does not match the documentation.

Packages and repository layout

Surface Role
Cratis.Arc / Cratis.Arc.Core .NET hosting, command/query pipelines, validation, identity, tenancy, HTTP, introspection, and application conventions
Cratis.Arc.ProxyGenerator.Build Build-time TypeScript proxy generation for recognized application artifacts
Cratis.Arc.MongoDB / Cratis.Arc.EntityFrameworkCore* Optional current-state persistence and observation adapters
Cratis.Arc.Chronicle Optional event-sourced command, projection, reducer, aggregate, reactor, tenancy, and compliance integration
Cratis.Arc.OpenApi / Cratis.Arc.Swagger Optional OpenAPI document transformation for Arc concepts and endpoints
Cratis.Arc.Testing / Cratis.Arc.Chronicle.Testing Command-scenario and optional Chronicle event/read-model testing helpers
@cratis/arc TypeScript command, query, validation, identity, and messaging runtime used by generated proxies
@cratis/arc.react React hooks, forms, dialogs, identity, messaging, and query composition for Arc contracts
@cratis/arc.react.mvvm Optional React/MVVM and dependency-injection integration
@cratis/arc.vite / @cratis/eslint-plugin-arc Vite metadata/query helpers and Arc-specific frontend lint rules
Source/DotNET .NET framework source
Source/JavaScript TypeScript and React package source
Documentation Product-owned documentation rendered on cratis.io
Samples Sample and integration applications used by repository checks

Package existence does not imply compatibility with every frontend, runtime, persistence provider, or product version. Check the package manifests and documentation for the versions you use.

Documentation map

Contributing

Arc is a framework-library repository. Changes to public APIs, analyzers, generated output, and package shapes can affect consumers and require the owning repository's compatibility and release review.

Repository development currently requires the SDK and toolchain versions declared by global.json and package.json. Follow the Cratis contribution guide and this repository's project context (AGENTS.md and the project rules it links) before changing public surfaces.

Before submitting documentation-only work, verify its links, anchors, and examples explicitly; current automated documentation checks are path-scoped. Source changes must pass the owning repository's applicable build, specification, TypeScript, and documentation gates.

  • .NET SDK 10.0.400+. Arc's analyzers and source generators are built against Roslyn 5.9.0, which ships with .NET SDK 10.0.400 and newer. On an older SDK band the compiler refuses to load them (CS9057), silently disabling proxy generation and the ARC*/ARCCHR* analyzers. Consuming the Cratis.Arc packages carries the same floor. Raising this floor is a minor version bump.
  • Node 23+
  • Yarn

Trim and NativeAOT diagnostics

Arc is not trim or NativeAOT compatible yet (#2204). Pull requests that change Source/DotNET run a ratchet that builds Cratis.Arc.Core, Cratis.Arc, Cratis.Arc.MongoDB, Cratis.Arc.EntityFrameworkCore and Cratis.Arc.Chronicle in one build with the trim and AOT analyzers on and compares the diagnostics per code, file and target framework with Source/DotNET/aot-baseline.json. It fails when a diagnostic or a trim/AOT suppression is added, and also when one is removed without shrinking the baseline. Run it locally with Python 3 and the .NET SDKs:

python3 scripts/aot-ratchet.py           # compare with the baseline
python3 scripts/aot-ratchet.py --update  # rewrite the baseline after fixing diagnostics, then commit it

Fix a new diagnostic by replacing the unsafe path rather than suppressing it. The analyzer ships with the .NET SDK, so run --update with the SDK global.json selects, as CI does; the baseline records the SDK version it was made with. When a new SDK changes what the analyzer reports, regenerate the baseline with --update in its own pull request. The normal build is unaffected; the analyzers only run when the script passes CratisAotAnalysis=true. A project is covered by importing Source/DotNET/AotAnalysis.props, which the script discovers, and the run fails unless every covered project reported for each of its target frameworks. The MongoDB, EF Core and Chronicle integrations are held at their current counts until they are annotated with [RequiresUnreferencedCode] and [RequiresDynamicCode].

Community and repository

Path Destination
Questions and discussion Cratis Discord
Bugs and feature requests GitHub Issues
Releases GitHub Releases
Documentation www.cratis.io/arc
Blog blog.cratis.io
Security reports Private security reporting
License LICENSE

The Cratis ecosystem

Arc is part of Cratis — a platform for building event-sourced and CQRS applications.

Arc is MIT licensed and free to use. Other Cratis products have their own licensing and access terms.

Release notes and announcements: the Cratis blog.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Cratis.Arc.Chronicle.CodeAnalysis:

Package Downloads
Cratis.Arc.Chronicle

Optional Cratis Chronicle event-sourcing integration for Cratis Arc: event-sourced commands, projections, reducers, aggregates, reactors, and tenant namespaces for CQRS applications on ASP.NET Core.

Cratis.CodeAnalysis

The full set of Cratis Arc Roslyn analyzers (ARC*, ARCCHR*) in a single reference. Opt in to all the analyzers at once instead of referencing each analyzer package individually.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
22.168.0 0 11/5/2026
22.167.0 5 11/4/2026
22.166.1 54 11/4/2026
22.166.0 120 11/4/2026
22.165.2 115 11/4/2026
22.165.1 52 11/4/2026
22.165.0 71 11/4/2026
22.164.0 63 11/4/2026
22.163.0 106 11/3/2026
22.162.0 272 11/3/2026
22.161.0 89 11/3/2026
22.160.0 76 11/3/2026
22.159.0 117 11/2/2026
22.158.0 119 11/2/2026
22.157.1 367 11/2/2026
22.157.0 146 11/2/2026
22.156.4 248 11/2/2026
22.156.3 127 11/2/2026
22.156.2 122 11/1/2026
22.156.1 119 11/1/2026
Loading failed