Soenneker.Extensions.Configuration 4.0.875

Prefix Reserved
dotnet add package Soenneker.Extensions.Configuration --version 4.0.875
                    
NuGet\Install-Package Soenneker.Extensions.Configuration -Version 4.0.875
                    
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="Soenneker.Extensions.Configuration" Version="4.0.875" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.Configuration" Version="4.0.875" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.Configuration" />
                    
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 Soenneker.Extensions.Configuration --version 4.0.875
                    
#r "nuget: Soenneker.Extensions.Configuration, 4.0.875"
                    
#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 Soenneker.Extensions.Configuration@4.0.875
                    
#: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=Soenneker.Extensions.Configuration&version=4.0.875
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.Configuration&version=4.0.875
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.Configuration

Strict scalar configuration lookup, optional string lookup, and guarded startup diagnostics for IConfiguration.

Installation

dotnet add package Soenneker.Extensions.Configuration

Required scalar values

using Soenneker.Extensions.Configuration;

string connectionName = configuration.GetStringStrict("Database:Name");
int port = configuration.GetValueStrict<int>("Server:Port");
bool enabled = configuration.GetValueStrict<bool>("Feature:Enabled");

GetValueStrict<T>() requires an actual scalar value at the key. A parent section that only contains children is not considered a value. Missing/null values throw NullReferenceException; invalid or unsupported conversions surface the configuration binder's conversion exception. An empty string is present, although it may fail conversion for a non-string target.

GetStringStrict() is the required-string convenience wrapper. GetString() returns null for a missing value:

string? optionalRegion = configuration.GetString("Service:Region");

These methods retrieve scalar values; they do not bind object graphs, validate ranges or formats, reload options, or aggregate startup errors. Use options binding and options validation for structured configuration.

Startup diagnostics

LogAll() does nothing unless both conditions are true:

  • Log:StartupConfiguration is true or 1
  • the logger has Debug enabled
configuration.LogAll(logger);

Entries are sorted by ordinal key. Common password, secret, token, API/access/account/private/signing/encryption key, connection-string, credential, authorization, shared-access, and Azure Functions storage keys are logged as [REDACTED]. Secret-looking connection-string values and private keys are also redacted. Non-redacted line breaks are escaped and values longer than 512 characters are truncated.

Add application-specific redaction with the overload:

configuration.LogAll(
    logger,
    key => key.StartsWith("TenantSecrets:", StringComparison.OrdinalIgnoreCase));

The custom predicate adds redaction; it cannot disable built-in redaction.

Redaction is heuristic and cannot recognize every secret name or proprietary value format. Do not enable full configuration logging in production or treat this as a secret-scanning boundary. Prefer logging an explicit allowlist of diagnostic settings when possible, and remember that configuration keys themselves are still visible.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (165)

Showing the top 5 NuGet packages that depend on Soenneker.Extensions.Configuration:

Package Downloads
Soenneker.Utils.BackgroundQueue

A high-performance background Task/ValueTask queue

Soenneker.Extensions.Configuration.Logging

A collection of helpful IConfiguration logging related extension methods

Soenneker.Cosmos.Client

A utility library for Azure Cosmos client accessibility

Soenneker.Blob.Container

A utility library for Azure Blob storage container operations

Soenneker.Validators.Email.Disposable.Online

A validation module checking for disposable email addresses via online sources

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.875 11,370 9/5/2026
4.0.874 23,648 9/4/2026
4.0.873 5,125 9/4/2026
4.0.872 64,398 8/31/2026
4.0.871 15,114 8/31/2026
4.0.870 15,164 8/31/2026
4.0.869 4,748 8/31/2026
4.0.868 12,017 8/30/2026
4.0.867 7,448 8/30/2026
4.0.866 15,319 8/30/2026
4.0.865 3,748 8/30/2026
4.0.864 2,417 8/30/2026
4.0.863 2,150 8/29/2026
4.0.862 7,658 8/29/2026
4.0.861 75,887 8/26/2026
4.0.860 7,928 8/25/2026
4.0.859 6,961 8/25/2026
4.0.858 27,546 8/21/2026
4.0.857 40,070 8/18/2026
4.0.856 40,974 8/12/2026
Loading failed

Update dependency Soenneker.Extensions.String to 4.0.739 (#1006)