Pragmatic.Configuration
1.0.0-alpha.1
See the version list below for details.
dotnet add package Pragmatic.Configuration --version 1.0.0-alpha.1
NuGet\Install-Package Pragmatic.Configuration -Version 1.0.0-alpha.1
<PackageReference Include="Pragmatic.Configuration" Version="1.0.0-alpha.1" />
<PackageVersion Include="Pragmatic.Configuration" Version="1.0.0-alpha.1" />
<PackageReference Include="Pragmatic.Configuration" />
paket add Pragmatic.Configuration --version 1.0.0-alpha.1
#r "nuget: Pragmatic.Configuration, 1.0.0-alpha.1"
#:package Pragmatic.Configuration@1.0.0-alpha.1
#addin nuget:?package=Pragmatic.Configuration&version=1.0.0-alpha.1&prerelease
#tool nuget:?package=Pragmatic.Configuration&version=1.0.0-alpha.1&prerelease
Pragmatic.Configuration
Zero-boilerplate configuration binding, validation, and DI registration via source generator, plus runtime stores with cascade resolution, multi-tenancy, hot-reload, and pluggable backends.
The Problem
Every IOptions<T> class needs the same binding/validation/registration boilerplate. Across 20 options
classes that's hundreds of lines of ceremony, and validation is opt-in: forget one
.ValidateDataAnnotations() and [Required] is silently ignored until it fails at runtime.
// 4 lines of ceremony per options class, repeated for every config type
services.AddOptions<BookingOptions>()
.Bind(configuration.GetSection("Booking"))
.ValidateDataAnnotations()
.ValidateOnStart();
Beyond that: secrets vary by environment, dynamic reconfiguration needs a deploy, and per-tenant overrides become hardcoded switch statements.
The Solution: two pillars
Compile-time binding: annotate a class with [Configuration]; the generator produces the binding,
DataAnnotation validation (on start, by default), and DI registration; the Pragmatic host calls that
registration itself.
[Configuration]
public partial class BookingOptions
{
[Required] public string CurrencyCode { get; init; } = "";
[Range(1, 365)] public int MaxStayDays { get; init; }
}
Runtime stores (opt-in, AddPragmaticConfiguration()): a unified API over configuration with
cascade resolution (user → tenant → environment → base, highest first; the tenant layer only with
MultiTenant.Enabled), hot-reload, and pluggable backends (Database, Azure App Configuration, Redis,
Consul, Kubernetes), without redeploying. Secrets live in an ISecretStore (Database, Azure Key Vault,
AWS, GCP, Vault, Kubernetes), and a secret://{key} value is resolved from it at read time.
Installation
dotnet add package Pragmatic.Configuration
dotnet add package Pragmatic.SourceGenerator # generates the [Configuration] binding
Status
Functional within 1.0.0-alpha: [Configuration] binding and validation, and the runtime stores
(cascade, hot-reload, the backends above). See the roadmap.
Documentation
| Guide | What you'll learn |
|---|---|
| Concepts | The two pillars, cascade resolution, hot-reload, choosing a backend |
| Getting Started | Your first [Configuration] class and a runtime store |
| Stores | Backends (Database, Azure), cascade, tenant overrides, hot-reload |
| Common Mistakes | The most frequent configuration pitfalls |
| Troubleshooting | Problem/solution guide with diagnostics |
Requirements
- .NET 10.0+
Pragmatic.SourceGeneratoranalyzer
License
Part of the Pragmatic.Design ecosystem. See Licensing. Pragmatic.Configuration is MIT-licensed.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.10)
- Microsoft.Extensions.Configuration.Json (>= 10.0.10)
- Microsoft.Extensions.Configuration.UserSecrets (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.10)
- Pragmatic.Abstractions (>= 1.0.0-alpha.1)
NuGet packages (10)
Showing the top 5 NuGet packages that depend on Pragmatic.Configuration:
| Package | Downloads |
|---|---|
|
Pragmatic.Configuration.Database
Database backend (ADO.NET) for Pragmatic.Configuration, supporting PostgreSQL, SQL Server, SQLite |
|
|
Pragmatic.Configuration.Management
Admin management package for Pragmatic.Configuration. Provides DomainActions and endpoints for viewing, editing, and auditing configuration values. |
|
|
Pragmatic.Agent.Client
Client library for connecting .NET apps to the Pragmatic Agent daemon. Provides AgentControlPlane, AgentConfigurationStore, AgentFeatureFlagStore, and socket-based IPC. |
|
|
Pragmatic.Configuration.Gcp
Google Cloud backend for Pragmatic.Configuration: secrets via GCP Secret Manager. |
|
|
Pragmatic.Configuration.Aws
AWS backend for Pragmatic.Configuration: secrets via AWS Secrets Manager and configuration via SSM Parameter Store. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.6 | 193 | 11/21/2026 |
| 1.0.0-alpha.5 | 123 | 11/21/2026 |
| 1.0.0-alpha.4 | 171 | 11/16/2026 |
| 1.0.0-alpha.3 | 536 | 10/17/2026 |
| 1.0.0-alpha.2 | 174 | 10/12/2026 |
| 1.0.0-alpha.1 | 398 | 10/3/2026 |