Pragmatic.Configuration.Gcp
1.0.0-alpha.6
dotnet add package Pragmatic.Configuration.Gcp --version 1.0.0-alpha.6
NuGet\Install-Package Pragmatic.Configuration.Gcp -Version 1.0.0-alpha.6
<PackageReference Include="Pragmatic.Configuration.Gcp" Version="1.0.0-alpha.6" />
<PackageVersion Include="Pragmatic.Configuration.Gcp" Version="1.0.0-alpha.6" />
<PackageReference Include="Pragmatic.Configuration.Gcp" />
paket add Pragmatic.Configuration.Gcp --version 1.0.0-alpha.6
#r "nuget: Pragmatic.Configuration.Gcp, 1.0.0-alpha.6"
#:package Pragmatic.Configuration.Gcp@1.0.0-alpha.6
#addin nuget:?package=Pragmatic.Configuration.Gcp&version=1.0.0-alpha.6&prerelease
#tool nuget:?package=Pragmatic.Configuration.Gcp&version=1.0.0-alpha.6&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
Pragmatic.Configuration ships for net10.0 and net11.0, with the same API on both. On .NET 11 the generated binder allocates
about 19% less per call.
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. net11.0 is compatible. |
-
net10.0
- Google.Cloud.SecretManager.V1 (>= 2.8.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Pragmatic.Configuration (>= 1.0.0-alpha.6)
-
net11.0
- Google.Cloud.SecretManager.V1 (>= 2.8.0)
- Pragmatic.Configuration (>= 1.0.0-alpha.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.6 | 65 | 11/21/2026 |
| 1.0.0-alpha.5 | 54 | 11/21/2026 |
| 1.0.0-alpha.4 | 65 | 11/16/2026 |
| 1.0.0-alpha.3 | 73 | 10/17/2026 |
| 1.0.0-alpha.2 | 73 | 10/12/2026 |
| 1.0.0-alpha.1 | 88 | 10/3/2026 |