Skip to content

Packages and target frameworks

Cratis Choreography ships as five NuGet packages. Reference Cratis.Choreography and a storage provider for most services, and add Cratis.Choreography.Chronicle only when you use Cratis Chronicle.

PackageContainsTarget frameworks
Cratis.ChoreographyJobs, workers, state machines, workflows, patching, tenancy, typed grain keys, serializers and silo hostingnet8.0, net9.0, net10.0
Cratis.Choreography.StorageThe jobs and patch storage APIs and the in-memory providersnet8.0, net9.0, net10.0
Cratis.Choreography.Storage.MongoDBThe MongoDB providers for jobs and patchesnet8.0, net9.0, net10.0
Cratis.Choreography.Storage.SqlThe SQL providers for jobs and patches, on EF Core for SQL Server, PostgreSQL and SQLitenet10.0
Cratis.Choreography.ChronicleEvent-sourced state machines and workflows whose runs are kept as Chronicle eventsnet8.0, net9.0, net10.0

The SQL provider targets net10.0 only, because EF Core 10 ships for net10.0 only. The other packages are packed for all three frameworks. A source build without packaging targets net10.0.

You wantReference
Jobs, workflows or state machines with no database, for development and testsCratis.Choreography
Durable state in MongoDBCratis.Choreography and Cratis.Choreography.Storage.MongoDB
Durable state in SQL Server, PostgreSQL or SQLiteCratis.Choreography and Cratis.Choreography.Storage.Sql
Event-sourced state machines or a Chronicle-backed workflow journalCratis.Choreography, a storage provider if you run jobs, and Cratis.Choreography.Chronicle

Cratis.Choreography references Cratis.Choreography.Storage, so you do not add it yourself. The storage provider packages and the Chronicle package reference Cratis.Choreography.

PackageNotable dependencies
Cratis.ChoreographyMicrosoft Orleans 10 (Sdk, Server, Reminders, Serialization and Serialization.SystemTextJson), Orleans.Providers.MongoDB, Cratis.Fundamentals, OneOf, System.Reactive and the ASP.NET Core shared framework
Cratis.Choreography.StorageMicrosoft.Orleans.Core.Abstractions, Cratis.Fundamentals, OneOf, System.Reactive
Cratis.Choreography.Storage.MongoDBMongoDB.Driver, Cratis.Arc.MongoDB, System.Reactive
Cratis.Choreography.Storage.SqlCratis.Arc.EntityFrameworkCore and the EF Core SQL Server, PostgreSQL and SQLite providers
Cratis.Choreography.ChronicleMicrosoft.Orleans.Sdk, Cratis.Chronicle

Only Cratis.Choreography.Chronicle depends on Cratis Chronicle. The other four packages work without it.

Orleans.Providers.MongoDB is built for Orleans 9 and asks for the 9.x reminders package, while the rest of the stack runs on Orleans 10. A 9.x Microsoft.Orleans.Reminders against a 10.x runtime fails with a MissingMethodException the moment a silo builds its grain services. Cratis.Choreography therefore carries a build target that reads the resolved package graph and fails your Release build when Microsoft.Orleans.Reminders and Microsoft.Orleans.Server resolve to different versions. The package’s own release build also restores a consumer for each framework and checks that every Microsoft.Orleans.* package resolves to one version.

If that error appears in your build, pin Microsoft.Orleans.Reminders in Directory.Packages.props, keep its direct PackageReference, and make it resolve to the same version as Microsoft.Orleans.Server. See Hosting for how the co-hosted silo avoids the MongoDB reminder table.