Microsoft.Extensions.Configuration.Binder
8.0.0-preview.6.23329.7
Prefix Reserved
See the version list below for details.
dotnet add package Microsoft.Extensions.Configuration.Binder --version 8.0.0-preview.6.23329.7
NuGet\Install-Package Microsoft.Extensions.Configuration.Binder -Version 8.0.0-preview.6.23329.7
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0-preview.6.23329.7" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0-preview.6.23329.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" />
paket add Microsoft.Extensions.Configuration.Binder --version 8.0.0-preview.6.23329.7
#r "nuget: Microsoft.Extensions.Configuration.Binder, 8.0.0-preview.6.23329.7"
#:package Microsoft.Extensions.Configuration.Binder@8.0.0-preview.6.23329.7
#addin nuget:?package=Microsoft.Extensions.Configuration.Binder&version=8.0.0-preview.6.23329.7&prerelease
#tool nuget:?package=Microsoft.Extensions.Configuration.Binder&version=8.0.0-preview.6.23329.7&prerelease
About
Provides the functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration. This package enables you to represent the configuration data as strongly-typed classes defined in the application code. To bind a configuration, use the Microsoft.Extensions.Configuration.ConfigurationBinder.Get extension method on the IConfiguration object. To use this package, you also need to install a package for the configuration provider, for example, Microsoft.Extensions.Configuration.Json for the JSON provider.
For more information, see the documentation: Configuration in .NET.
Example
The following example shows how to bind a JSON configuration section to .NET objects.
using System;
using Microsoft.Extensions.Configuration;
class Settings
{
public string Server { get; set; }
public string Database { get; set; }
public Endpoint[] Endpoints { get; set; }
}
class Endpoint
{
public string IPAddress { get; set; }
public int Port { get; set; }
}
class Program
{
static void Main()
{
// Build a configuration object from JSON file
IConfiguration config = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.Build();
// Bind a configuration section to an instance of Settings class
Settings settings = config.GetSection("Settings").Get<Settings>();
// Read simple values
Console.WriteLine($"Server: {settings.Server}");
Console.WriteLine($"Database: {settings.Database}");
// Read nested objects
Console.WriteLine("Endpoints: ");
foreach (Endpoint endpoint in settings.Endpoints)
{
Console.WriteLine($"{endpoint.IPAddress}:{endpoint.Port}");
}
}
}
To run this example, include an appsettings.json file with the following content in your project:
{
"Settings": {
"Server": "example.com",
"Database": "Northwind",
"Endpoints": [
{
"IPAddress": "192.168.0.1",
"Port": "80"
},
{
"IPAddress": "192.168.10.1",
"Port": "8080"
}
]
}
}
You can include a configuration file using a code like this in your .csproj file:
<ItemGroup>
<Content Include="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.6.23329.7)
-
.NETStandard 2.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.6.23329.7)
-
net6.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.6.23329.7)
-
net7.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.6.23329.7)
-
net8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.6.23329.7)
NuGet packages (5.6K)
Showing the top 5 NuGet packages that depend on Microsoft.Extensions.Configuration.Binder:
| Package | Downloads |
|---|---|
|
Microsoft.Extensions.Options.ConfigurationExtensions
Provides additional configuration specific functionality related to Options. |
|
|
Microsoft.Extensions.Logging.Configuration
Configuration support for Microsoft.Extensions.Logging. |
|
|
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications. |
|
|
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog. |
|
|
Microsoft.Extensions.Azure
Azure Client SDK integration with Microsoft.Extensions libraries |
GitHub repositories (433)
Showing the top 20 popular GitHub repositories that depend on Microsoft.Extensions.Configuration.Binder:
| Repository | Stars |
|---|---|
|
jellyfin/jellyfin
The Free Software Media System - Server Backend & API
|
|
|
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
|
|
|
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
|
|
|
d2phap/ImageGlass
🏞 A lightweight, versatile image viewer
|
|
|
microsoft/garnet
Garnet is a remote cache-store from Microsoft Research that offers strong performance (throughput and latency), scalability, storage, recovery, cluster sharding, key migration, and replication features. Garnet can work with existing Redis clients.
|
|
|
chocolatey/choco
Chocolatey - the package manager for Windows
|
|
|
dotnet/orleans
Cloud Native application framework for .NET
|
|
|
JeffreySu/WeiXinMPSDK
微信全平台 .NET SDK, Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 10.0。已支持微信公众号、小程序、小游戏、微信支付、企业微信/企业号、开放平台、JSSDK、微信周边等全平台。 WeChat SDK for C#.
|
|
|
ThreeMammals/Ocelot
.NET API Gateway
|
|
|
RayWangQvQ/BiliBiliToolPro
B 站(bilibili)自动任务工具,支持docker、青龙、k8s等多种部署方式。敏感肌也能用。
|
|
|
microsoft/ailab
Experience, Learn and Code the latest breakthrough innovations with Microsoft AI
|
|
|
NancyFx/Nancy
Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono
|
|
|
Azure/azure-sdk-for-net
This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
|
|
|
dotnet/aspire
Aspire is the tool for code-first, extensible, observable dev and deploy.
|
|
|
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
|
|
|
tModLoader/tModLoader
A mod to make and play Terraria mods. Supports Terraria 1.4 (and earlier) installations
|
|
|
dotnetcore/Util
Util是一个.Net平台下的应用框架,旨在提升中小团队的开发能力,由工具类、分层架构基类、Ui组件,配套代码生成模板,权限等组成。
|
|
|
Scighost/Starward
Game Launcher for miHoYo - 米家游戏启动器
|
|
|
ivanpaulovich/clean-architecture-manga
:cyclone: Clean Architecture with .NET6, C#10 and React+Redux. Use cases as central organizing structure, completely testable, decoupled from frameworks
|
|
|
jamesmh/coravel
Near-zero config .NET library that makes advanced application features like Task Scheduling, Caching, Queuing, Event Broadcasting, and more a breeze!
|
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.1.26104.118 | 16,157 | 2/10/2026 |
| 10.0.3 | 4,389,840 | 2/10/2026 |
| 10.0.2 | 8,782,492 | 1/13/2026 |
| 10.0.1 | 9,582,598 | 12/9/2025 |
| 10.0.0 | 23,895,322 | 11/11/2025 |
| 10.0.0-rc.2.25502.107 | 294,364 | 10/14/2025 |
| 10.0.0-rc.1.25451.107 | 326,364 | 9/9/2025 |
| 10.0.0-preview.7.25380.108 | 113,609 | 8/12/2025 |
| 10.0.0-preview.6.25358.103 | 113,748 | 7/15/2025 |
| 10.0.0-preview.5.25277.114 | 137,226 | 6/6/2025 |
| 9.0.13 | 572,932 | 2/10/2026 |
| 9.0.12 | 1,536,007 | 1/13/2026 |
| 9.0.11 | 6,632,207 | 11/11/2025 |
| 9.0.10 | 14,660,764 | 10/14/2025 |
| 9.0.9 | 18,591,636 | 9/9/2025 |
| 9.0.8 | 18,076,497 | 8/4/2025 |
| 9.0.7 | 14,937,660 | 7/8/2025 |
| 9.0.6 | 16,069,310 | 6/10/2025 |
| 9.0.5 | 19,884,971 | 5/13/2025 |
| 8.0.0-preview.6.23329.7 | 262,152 | 7/11/2023 |