Cocoar.Configuration.Abstractions 4.3.0-beta.3

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

Reactive, strongly-typed configuration layering for .NET

Cocoar.Configuration

License: Apache-2.0 NuGet Downloads

Zero ceremony configuration that updates itself. Define a class, add a rule, inject it — no IOptions<T> wrappers, no Configure<T>() calls.

Install

dotnet add package Cocoar.Configuration              # Core library (console apps)
dotnet add package Cocoar.Configuration.DI            # + Microsoft.Extensions.DI
dotnet add package Cocoar.Configuration.AspNetCore     # + health endpoints, feature flags

You only need one — each includes everything above it. Requires .NET 8+.

Quick Start

var builder = WebApplication.CreateBuilder(args);

builder.AddCocoarConfiguration(c => c
    .UseConfiguration(rule => [
        rule.For<AppSettings>().FromFile("appsettings.json"),
        rule.For<AppSettings>().FromEnvironment("APP_"),
    ]));

var app = builder.Build();

// Inject directly — no wrapper
app.MapGet("/settings", (AppSettings settings) => new
{
    settings.AppName,
    settings.MaxRetries
});

app.Run();

Key Features

  • Zero Ceremony — Define a class, add a rule, inject it. Just your POCO.
  • Reactive by DefaultIReactiveConfig<T> updates automatically when sources change.
  • Atomic UpdatesIReactiveConfig<(T1, T2)> guarantees consistent snapshots across types.
  • Explicit Layering — Rules execute in order, last write wins. File, environment, CLI, HTTP.
  • Memory-Safe SecretsSecret<T> with automatic zeroization and X.509 hybrid encryption.
  • Feature Flags & Entitlements — Strongly-typed, source-generated, with expiry health monitoring.
  • Health Monitoring — Per-rule status tracking, OpenTelemetry metrics, ASP.NET Core health checks.
  • Compile-Time Validation — Roslyn analyzers catch configuration errors in your IDE.
  • First-Class TestingCocoarTestConfiguration with AsyncLocal<T> isolation.

Providers

Provider Fluent API Package
File (JSON) .FromFile("path") Core
Environment Variables .FromEnvironment("PREFIX_") Core
Command Line .FromCommandLine("--prefix") Core
Static / Observable .FromStaticJson() / .FromObservable() Core
HTTP .FromHttp(url) Http
Microsoft IConfiguration .FromIConfiguration(config) MicrosoftAdapter

Examples

Explore real-world scenarios in the examples directory.

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

License

Apache-2.0 — see NOTICE for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Cocoar.Configuration.Abstractions:

Package Downloads
Cocoar.Configuration

Reactive, strongly-typed configuration for .NET. Layered rules, atomic updates, feature flags, entitlements, memory-safe secrets (RSA-OAEP + AES-256-GCM), health monitoring, and providers (file, environment, command-line, static, observable).

Cocoar.Configuration.Flags

Feature Flags and Entitlements for Cocoar.Configuration. Provides delegate-based flags with metadata via Capabilities. Base classes for temporary feature flags (with expiration) and permanent entitlements. Reactive, type-safe, and designed for clean separation of technical vs business decisions. Includes a Roslyn source generator that emits descriptor-based registry population at compile time.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.0 47 3/24/2026
5.0.0-beta.8 24 3/24/2026
5.0.0-beta.2 76 3/19/2026
4.3.0-flags.4 57 3/10/2026
4.3.0-beta.3 40 3/19/2026
4.2.1 220 2/3/2026
4.2.0 163 2/3/2026
4.2.0-master-backplane-arch... 56 2/3/2026
4.2.0-master-backplane-arch... 61 2/2/2026
4.2.0-master-backplane-arch... 58 2/2/2026
4.2.0-master-backplane-arch... 61 2/1/2026
4.2.0-beta.5 54 1/30/2026
4.2.0-beta.4 53 1/30/2026
4.2.0-beta.3 59 1/30/2026
4.2.0-beta.2 62 1/30/2026
4.2.0-beta.1 62 1/30/2026