Soml.Extensions.Configuration 0.0.1

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

Soml.Extensions.Configuration

SOML configuration files for Microsoft.Extensions.Configuration

dotnet add package Soml.Extensions.Configuration
var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddSomlFile("appsettings.soml", optional: false, reloadOnChange: true);

A document becomes configuration as JSON does with AddJsonFile: nested keys are joined with :, array items are keyed by their index (servers:0:host), an empty object is a key with a null value, and an empty array is a key with an empty string. Configuration keys are case-insensitive, so two flattened keys that differ only in case are an error. Keys containing : can also collide with nested paths.

Values are strings, as the binder expects: an int and a float in the invariant culture, a bool as True or False, an instant in canonical form, and a duration as TimeSpan writes itself, such as 01:30:00, so that it binds to a TimeSpan. A duration finer than the 100 nanoseconds of a TimeSpan stays in SOML form, such as 1ns, and does not bind to one. An instant finer than 100 nanoseconds binds to a DateTimeOffset rounded to 100 nanoseconds, except one that rounds past the end of year 9999, which does not bind.

Keys stay as they are written, as the SOML spec asks, so a kebab-case key such as allowed-origins does not bind to a property named AllowedOrigins. Name the key with [ConfigurationKeyName("allowed-origins")], or read the file with SomlSerializer from the Soml package, which maps kebab-case keys by default.

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

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
0.0.1 101 11/1/2026