SemanticTypeModel.Configuration 2.5.3

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

SemanticTypeModel.Configuration

What this package does

SemanticTypeModel.Configuration derives an inspectable Configuration domain model from a TypeSchemaModel and registers one explicitly selected options type with Microsoft.Extensions.Options.

Install

dotnet add package SemanticTypeModel.Configuration --version 2.4.0

Minimal example

using SemanticTypeModel.Configuration;

OptionsBuilder<ColdStorageOptions> builder = services.AddSemanticOptions<ColdStorageOptions>(
    configuration,
    AppSemanticTypeModel.Create());

The application chooses each options type it uses. A complete semantic model can contain ColdStorageOptions, QueueOptions, and UnusedOptions, but only calls to AddSemanticOptions<TOptions> create options registrations for the selected TOptions.

Main APIs

API Purpose
DeriveConfigurationType<TOptions> Derives one selected ConfigurationType and diagnostics from a complete semantic model.
AddSemanticOptions<TOptions> Binds and validates one selected options type and returns OptionsBuilder<TOptions>.
SemanticOptionsRegistration Allows deployment-specific overrides for options name, section path, ValidateOnStart, and section-presence strengthening.
ConfigurationSectionPresence Declares whether effective data under the selected section is optional or required.
DeriveConfigurationModel Derives the complete Configuration domain model for inspection, tooling, and bulk analysis.
ConfigurationSemanticModel.Inspect Produces deterministic inspection text, including section presence.

AddSemanticConfigurationOptions(ConfigurationSemanticModel) is obsolete. Use explicit per-type registration with AddSemanticOptions<TOptions> for application startup.

Validation behavior

AddSemanticOptions<TOptions> fails during registration for model or programming errors such as a missing selected type, ambiguous CLR type match, non-Configuration selected type, missing section path, root required section binding, or unsupported bind policy.

Deployed configuration errors fail through Options validation. Required section presence, DataAnnotations, and RequiredWhen rules are attached to the selected options registration; enabling ValidateOnStart moves those validation failures to host startup.

Does not do

  • It does not register every Configuration type in a complete model.
  • It does not provide skip or exclusion lists because selected-type registration is explicit.
  • It does not read configuration files, own provider setup, or manage secrets.
  • It does not treat an empty JSON object as provider-independent proof that a section exists.

More documentation

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
4.0.1 88 8/18/2026
4.0.0 100 8/16/2026
2.6.0 90 8/4/2026
2.5.3 100 8/4/2026
2.5.1 94 8/4/2026
2.5.0 99 8/3/2026
2.4.6 98 8/3/2026
2.4.5 97 8/3/2026
2.4.4 104 8/2/2026
2.4.3 95 7/31/2026
2.4.2 97 7/31/2026
2.4.1 109 7/3/2026
2.4.0 108 7/2/2026
2.3.0 108 6/20/2026