Cratis.Observability.SourceGenerators 7.35.2

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Cratis.Observability.SourceGenerators --version 7.35.2
                    
NuGet\Install-Package Cratis.Observability.SourceGenerators -Version 7.35.2
                    
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.Observability.SourceGenerators" Version="7.35.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cratis.Observability.SourceGenerators" Version="7.35.2" />
                    
Directory.Packages.props
<PackageReference Include="Cratis.Observability.SourceGenerators" />
                    
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.Observability.SourceGenerators --version 7.35.2
                    
#r "nuget: Cratis.Observability.SourceGenerators, 7.35.2"
                    
#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.Observability.SourceGenerators@7.35.2
                    
#: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.Observability.SourceGenerators&version=7.35.2
                    
Install as a Cake Addin
#tool nuget:?package=Cratis.Observability.SourceGenerators&version=7.35.2
                    
Install as a Cake Tool

Fundamentals

The shared building blocks beneath the Cratis stack — concepts, serialization, dependency injection, and type discovery for .NET and TypeScript, with typed concepts and codecs for Go.

Packages

Nuget NPM MIT License

Builds

.NET Build JavaScript Build Documentation site

Description

The Cratis Fundamentals holds generic reusable helpers, utilities and tools that aims at solving common problems and help developers be more productive. Fundamentals offers functionality for .NET and JavaScript environments. It is not a goal to have parity, as the different environments offer different building blocks.

You should look at it as a convenience layer on top of the existing base environment you're running in.

Fundamentals underpins the rest of the Cratis stack: Chronicle (the event-sourcing database and runtime), Arc (the CQRS application framework for ASP.NET Core), and Components (the React component library) all build on it — and you can use it on its own.

Start with your platform

  • C# / .NET: give domain values distinct types with ConceptAs<T>, discover services by convention, or represent absence and failure explicitly.
  • TypeScript: use GUIDs, serialization, property-path helpers, and decorators.
  • Go: use typed concepts and scalar codecs, correlation, naming, and optional dependency injection.

The APIs differ by platform; a feature in the .NET package is not a promise of a TypeScript or Go equivalent. You can use Fundamentals without Arc or Chronicle.

Try the .NET package on its own

With a .NET 10 SDK, create a console project and install the package:

dotnet new console --framework net10.0 --name FundamentalsDemo
cd FundamentalsDemo
dotnet add package Cratis.Fundamentals --version 7.32.0

Replace Program.cs with this complete example:

using System;
using Cratis.Monads;

public static class QuickStart
{
    public static void Main()
    {
        Option<string> timeout = "30";
        Console.WriteLine(timeout.Match(
            value => $"Configured: {value}",
            _ => "Use the default timeout"));
    }
}

Option<string> represents either text or an explicit absence. Match handles both cases and returns the selected message. Run it:

dotnet run

Expected output:

Configured: 30

Continue with the Option, Result, and Catch chapter to look up an absent setting, reject invalid input with a typed error, and adapt a throwing parser. These APIs live in Cratis.Monads in the core package; they need no host or running service.

Browse the Fundamentals documentation for the other building blocks.

Support

Cratis is an open community, and we are glad to help users, teams evaluating the stack, and contributors.

Channel Details
Discord Join the community on Discord for questions and discussions
GitHub Issues Report bugs or request features
Documentation Read the docs at cratis.io

Contributing

If you want to jump into building this repository and possibly contributing, please refer to contributing.

Prerequisites

The following are prerequisites to work with this repository.

  • .NET SDK 11.0 (currently a release candidate), as selected by global.json (roll-forward policy latestFeature).
  • Node 23+ (engines.node is >=23.0.0 in package.json).
  • Yarn

Consumers of the published libraries are not affected by these contributor requirements; the libraries target net10.0 and net11.0.

Running .NET specifications

The specifications use Cratis.Specifications 5.0 on the native xUnit v3 runner and require .NET 11. Specification projects target net11.0 by default. Set -p:SpecificationsTestFrameworks='"net10.0;net11.0"' to build them for both, as CI does; libraries build and pack for net10.0 and net11.0 in Release.

From the repository root, build once and run the five specification executables in parallel:

dotnet build -c Release
bash .github/scripts/run-specifications.sh Release

To run on both target frameworks, build with -p:SpecificationsTestFrameworks='"net10.0;net11.0"' and set SPECIFICATION_FRAMEWORKS="net10.0 net11.0" for the script.

Logs and TRX results go under TestResults/. The script fails if a project is missing, fails, or runs zero tests. Use bash .github/scripts/run-specifications.sh --self-test to check the runner's failure guards.

For a single project, run its executable directly (append .exe on Windows):

Source/DotNET/Fundamentals.Specs/bin/Release/net11.0/Cratis.Fundamentals.Specs

Use -method, -class, or -namespace with a fully qualified name to filter the executable's tests; run it with -? to see all options. For example:

Source/DotNET/Fundamentals.Specs/bin/Release/net11.0/Cratis.Fundamentals.Specs -namespace 'Cratis.Concepts*'

dotnet test -c Release --no-build and IDE test explorers continue to use the VSTest adapter. They do not require Microsoft.Testing.Platform configuration. For Debug, build with dotnet build and run dotnet test --no-build. AOT.Specs is skipped by dotnet test; run it as an executable through bash .github/scripts/run-specifications.sh Release (also covered by the native-aot CI job).

Central Package Management

This repository leverages Central Package Management, which means that all package versions are managed from a file at the root level called Directory.Packages.props.

In addition there are also Directory.Build.props files for setting up common settings that are applied cross cuttingly.

Root package.json

The package.json found at the root level defines all the workspaces. It is assumed

All developer dependencies are defined in the top level package.json. The reason for this is to be able to provide global scripts for every package to use for easier maintenance.

The package.json found at the top level contains scripts that can then be used in a child project for this to work properly.

In a package, all you need to do is to define the scripts to use the global scripts in the `package.json´ of that project:

{
    "scripts": {
        "prepublish": "yarn g:build",
        "clean": "yarn g:clean",
        "build": "yarn g:build",
        "lint": "yarn g:lint",
        "lint:ci": "yarn g:lint:ci",
        "test": "yarn g:test",
        "ci": "yarn g:ci",
        "up": "yarn g:up"
    }
}

The Cratis ecosystem

This project is part of the Cratis Platform — tools for building event-sourced and CQRS applications.

Fundamentals is MIT licensed and free to use.

Join the community on Discord.

Release notes and announcements: the Cratis blog.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Cratis.Observability.SourceGenerators:

Package Downloads
Cratis.Metrics.Roslyn

Deprecated: renamed to Cratis.Observability.SourceGenerators. This package only depends on Cratis.Observability.SourceGenerators so existing references keep working; reference Cratis.Observability.SourceGenerators directly.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.36.1 88 11/30/2026
7.36.0 61 11/30/2026
7.35.3 67 11/30/2026
7.35.2 67 11/30/2026
7.35.1 66 11/30/2026
7.35.0 68 11/29/2026
7.34.5 369 11/25/2026
7.34.4 19,599 11/23/2026
7.34.3 41,876 11/19/2026
7.34.2 163 11/18/2026
7.34.1 191 11/15/2026
7.34.0 38,557 11/10/2026
7.33.1 67,604 11/3/2026
7.33.0 135 11/3/2026
7.32.1 137 11/2/2026
7.32.0 19,040 11/1/2026
7.31.0 140 11/1/2026
7.30.2 578 10/31/2026
7.30.1 144 10/31/2026
7.30.0 157 10/30/2026
Loading failed