Microsoft.Extensions.Configuration.Binder
8.0.0-rc.1.23419.4
Prefix Reserved
See the version list below for details.
dotnet add package Microsoft.Extensions.Configuration.Binder --version 8.0.0-rc.1.23419.4
NuGet\Install-Package Microsoft.Extensions.Configuration.Binder -Version 8.0.0-rc.1.23419.4
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0-rc.1.23419.4" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0-rc.1.23419.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" />
paket add Microsoft.Extensions.Configuration.Binder --version 8.0.0-rc.1.23419.4
#r "nuget: Microsoft.Extensions.Configuration.Binder, 8.0.0-rc.1.23419.4"
#:package Microsoft.Extensions.Configuration.Binder@8.0.0-rc.1.23419.4
#addin nuget:?package=Microsoft.Extensions.Configuration.Binder&version=8.0.0-rc.1.23419.4&prerelease
#tool nuget:?package=Microsoft.Extensions.Configuration.Binder&version=8.0.0-rc.1.23419.4&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-rc.1.23419.4)
-
.NETStandard 2.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-rc.1.23419.4)
-
net6.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-rc.1.23419.4)
-
net7.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-rc.1.23419.4)
-
net8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-rc.1.23419.4)
NuGet packages (5.4K)
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.AspNetCore.Server.Kestrel.Core
Core components of ASP.NET Core Kestrel cross-platform web server. |
GitHub repositories (426)
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.
|
|
|
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
|
|
|
dotnet/aspire
Aspire is the tool for code-first, extensible, observable dev and deploy.
|
|
|
tModLoader/tModLoader
A mod to make and play Terraria mods. Supports Terraria 1.4 (and earlier) installations
|
|
|
dotnetcore/Util
Util是一个.Net平台下的应用框架,旨在提升中小团队的开发能力,由工具类、分层架构基类、Ui组件,配套代码生成模板,权限等组成。
|
|
|
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
|
|
|
Scighost/Starward
Game Launcher for miHoYo - 米家游戏启动器
|
|
|
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 | |
|---|---|---|---|
| 10.0.2 | 111,075 | 1/13/2026 | |
| 10.0.1 | 3,724,567 | 12/9/2025 | |
| 10.0.0 | 9,305,292 | 11/11/2025 | |
| 10.0.0-rc.2.25502.107 | 260,868 | 10/14/2025 | |
| 10.0.0-rc.1.25451.107 | 292,425 | 9/9/2025 | |
| 10.0.0-preview.7.25380.108 | 99,177 | 8/12/2025 | |
| 10.0.0-preview.6.25358.103 | 94,796 | 7/15/2025 | |
| 10.0.0-preview.5.25277.114 | 116,057 | 6/6/2025 | |
| 10.0.0-preview.4.25258.110 | 97,250 | 5/12/2025 | |
| 10.0.0-preview.3.25171.5 | 109,491 | 4/10/2025 | |
| 10.0.0-preview.2.25163.2 | 71,952 | 3/18/2025 | |
| 10.0.0-preview.1.25080.5 | 204,584 | 2/25/2025 | |
| 9.0.12 | 21,440 | 1/13/2026 | |
| 9.0.11 | 3,628,340 | 11/11/2025 | |
| 9.0.10 | 10,398,940 | 10/14/2025 | |
| 9.0.9 | 14,515,693 | 9/9/2025 | |
| 9.0.8 | 14,753,682 | 8/4/2025 | |
| 9.0.7 | 12,428,628 | 7/8/2025 | |
| 9.0.6 | 13,683,767 | 6/10/2025 | |
| 9.0.5 | 17,217,738 | 5/13/2025 | |
| 9.0.4 | 21,406,534 | 4/8/2025 | |
| 9.0.3 | 17,429,416 | 3/11/2025 | |
| 9.0.2 | 19,503,156 | 2/11/2025 | |
| 9.0.1 | 21,089,209 | 1/14/2025 | |
| 9.0.0 | 125,886,904 | 11/12/2024 | |
| 9.0.0-rc.2.24473.5 | 661,515 | 10/8/2024 | |
| 9.0.0-rc.1.24431.7 | 482,338 | 9/10/2024 | |
| 9.0.0-preview.7.24405.7 | 179,063 | 8/13/2024 | |
| 9.0.0-preview.6.24327.7 | 305,874 | 7/9/2024 | |
| 9.0.0-preview.5.24306.7 | 137,412 | 6/11/2024 | |
| 9.0.0-preview.4.24266.19 | 104,535 | 5/21/2024 | |
| 9.0.0-preview.3.24172.9 | 266,352 | 4/11/2024 | |
| 9.0.0-preview.2.24128.5 | 145,937 | 3/12/2024 | |
| 9.0.0-preview.1.24080.9 | 149,449 | 2/13/2024 | |
| 8.0.2 | 182,332,140 | 7/9/2024 | |
| 8.0.1 | 121,511,618 | 1/9/2024 | |
| 8.0.0 | 432,692,136 | 11/14/2023 | |
| 8.0.0-rc.2.23479.6 | 1,905,910 | 10/10/2023 | |
| 8.0.0-rc.1.23419.4 | 713,798 | 9/12/2023 | |
| 8.0.0-preview.7.23375.6 | 763,957 | 8/8/2023 | |
| 8.0.0-preview.6.23329.7 | 250,072 | 7/11/2023 | |
| 8.0.0-preview.5.23280.8 | 140,923 | 6/13/2023 | |
| 8.0.0-preview.4.23259.5 | 367,884 | 5/16/2023 | |
| 8.0.0-preview.3.23174.8 | 217,248 | 4/11/2023 | |
| 8.0.0-preview.2.23128.3 | 108,240 | 3/14/2023 | |
| 8.0.0-preview.1.23110.8 | 145,893 | 2/21/2023 | |
| 7.0.4 | 55,639,534 | 3/14/2023 | |
| 7.0.3 | 64,192,495 | 2/14/2023 | |
| 7.0.2 | 8,504,818 | 1/10/2023 | |
| 7.0.1 | 5,300,601 | 12/13/2022 | |
| 7.0.0 | 142,897,052 | 11/7/2022 | |
| 7.0.0-rc.2.22472.3 | 290,020 | 10/11/2022 | |
| 7.0.0-rc.1.22426.10 | 206,939 | 9/14/2022 | |
| 7.0.0-preview.7.22375.6 | 230,392 | 8/9/2022 | |
| 7.0.0-preview.6.22324.4 | 103,657 | 7/12/2022 | |
| 7.0.0-preview.5.22301.12 | 68,655 | 6/14/2022 | |
| 7.0.0-preview.4.22229.4 | 87,185 | 5/10/2022 | |
| 7.0.0-preview.3.22175.4 | 84,520 | 4/13/2022 | |
| 7.0.0-preview.2.22152.2 | 45,805 | 3/14/2022 | |
| 7.0.0-preview.1.22076.8 | 57,490 | 2/17/2022 | |
| 6.0.1 | 4,387,702 | 11/12/2024 | |
| 6.0.0 | 439,428,087 | 11/8/2021 | |
| 6.0.0-rc.2.21480.5 | 625,273 | 10/12/2021 | |
| 6.0.0-rc.1.21451.13 | 384,391 | 9/14/2021 | |
| 6.0.0-preview.7.21377.19 | 259,299 | 8/10/2021 | |
| 6.0.0-preview.6.21352.12 | 121,459 | 7/14/2021 | |
| 6.0.0-preview.5.21301.5 | 69,480 | 6/15/2021 | |
| 6.0.0-preview.4.21253.7 | 68,104 | 5/24/2021 | |
| 6.0.0-preview.3.21201.4 | 217,502 | 4/8/2021 | |
| 6.0.0-preview.2.21154.6 | 121,128 | 3/11/2021 | |
| 6.0.0-preview.1.21102.12 | 127,576 | 2/12/2021 | |
| 5.0.0 | 259,933,052 | 11/9/2020 | |
| 5.0.0-rc.2.20475.5 | 298,533 | 10/13/2020 | |
| 5.0.0-rc.1.20451.14 | 340,706 | 9/14/2020 | |
| 5.0.0-preview.8.20407.11 | 382,072 | 8/25/2020 | |
| 5.0.0-preview.7.20364.11 | 75,032 | 7/21/2020 | |
| 5.0.0-preview.6.20305.6 | 58,439 | 6/25/2020 | |
| 5.0.0-preview.5.20278.1 | 29,764 | 6/10/2020 | |
| 5.0.0-preview.4.20251.6 | 57,536 | 5/18/2020 | |
| 5.0.0-preview.3.20215.2 | 239,428 | 4/23/2020 | |
| 5.0.0-preview.2.20160.3 | 235,576 | 4/2/2020 | |
| 5.0.0-preview.1.20120.4 | 93,631 | 3/16/2020 | |
| 3.1.32 | 22,881,173 | 12/13/2022 | |
| 3.1.31 | 4,263,973 | 11/8/2022 | |
| 3.1.30 | 3,633,387 | 10/11/2022 | |
| 3.1.29 | 3,355,379 | 9/13/2022 | |
| 3.1.28 | 3,953,036 | 8/9/2022 | |
| 3.1.27 | 2,986,842 | 7/12/2022 | |
| 3.1.26 | 2,651,094 | 6/14/2022 | |
| 3.1.25 | 3,834,312 | 5/10/2022 | |
| 3.1.24 | 2,876,439 | 4/11/2022 | |
| 3.1.23 | 4,373,747 | 3/8/2022 | |
| 3.1.22 | 23,512,607 | 12/14/2021 | |
| 3.1.21 | 10,822,903 | 11/7/2021 | |
| 3.1.20 | 5,634,793 | 10/11/2021 | |
| 3.1.19 | 6,165,146 | 9/14/2021 | |
| 3.1.18 | 49,762,779 | 8/10/2021 | |
| 3.1.17 | 7,812,359 | 7/13/2021 | |
| 3.1.16 | 11,623,980 | 6/8/2021 | |
| 3.1.15 | 9,728,716 | 5/11/2021 | |
| 3.1.14 | 18,677,584 | 4/6/2021 | |
| 3.1.13 | 15,574,031 | 3/9/2021 | |
| 3.1.12 | 12,626,137 | 2/9/2021 | |
| 3.1.11 | 15,226,617 | 1/12/2021 | |
| 3.1.10 | 26,248,330 | 11/9/2020 | |
| 3.1.9 | 80,359,708 | 10/13/2020 | |
| 3.1.8 | 72,144,542 | 9/8/2020 | |
| 3.1.7 | 39,706,112 | 8/11/2020 | |
| 3.1.6 | 43,053,033 | 7/14/2020 | |
| 3.1.5 | 43,444,742 | 6/9/2020 | |
| 3.1.4 | 52,337,807 | 5/12/2020 | |
| 3.1.3 | 121,609,964 | 3/24/2020 | |
| 3.1.2 | 81,383,862 | 2/18/2020 | |
| 3.1.1 | 45,971,766 | 1/14/2020 | |
| 3.1.0 | 234,989,188 | 12/3/2019 | |
| 3.1.0-preview3.19553.2 | 227,950 | 11/13/2019 | |
| 3.1.0-preview2.19525.4 | 75,544 | 11/1/2019 | |
| 3.1.0-preview1.19506.1 | 1,240,000 | 10/15/2019 | |
| 3.0.3 | 94,492,151 | 2/18/2020 | |
| 3.0.2 | 1,360,191 | 1/14/2020 | |
| 3.0.1 | 7,084,478 | 11/18/2019 | |
| 3.0.0 | 98,303,924 | 9/23/2019 | |
| 3.0.0-rc1.19456.10 | 92,369 | 9/16/2019 | |
| 3.0.0-preview9.19423.4 | 1,514,078 | 9/4/2019 | |
| 3.0.0-preview8.19405.4 | 611,080 | 8/13/2019 | |
| 3.0.0-preview7.19362.4 | 228,977 | 7/23/2019 | |
| 3.0.0-preview6.19304.6 | 353,028 | 6/12/2019 | |
| 3.0.0-preview5.19227.9 | 857,499 | 5/6/2019 | |
| 3.0.0-preview4.19216.2 | 71,008 | 4/18/2019 | |
| 3.0.0-preview3.19153.1 | 351,214 | 3/6/2019 | |
| 3.0.0-preview.19074.2 | 183,884 | 1/29/2019 | |
| 3.0.0-preview.18572.1 | 160,614 | 12/3/2018 | |
| 2.2.4 | 35,518,430 | 4/9/2019 | |
| 2.2.0 | 296,215,072 | 12/3/2018 | |
| 2.2.0-preview3-35497 | 418,459 | 10/17/2018 | |
| 2.2.0-preview2-35157 | 296,423 | 9/12/2018 | |
| 2.2.0-preview1-35029 | 158,726 | 8/22/2018 | |
| 2.1.10 | 114,317,254 | 4/9/2019 | |
| 2.1.1 | 487,335,956 | 6/18/2018 | |
| 2.1.0 | 476,755,019 | 5/29/2018 | |
| 2.1.0-rc1-final | 621,868 | 5/6/2018 | |
| 2.1.0-preview2-final | 669,655 | 4/10/2018 | |
| 2.1.0-preview1-final | 656,940 | 2/26/2018 | |
| 2.0.2 | 8,935,673 | 5/7/2018 | |
| 2.0.1 | 13,497,210 | 3/13/2018 | |
| 2.0.0 | 424,995,026 | 8/11/2017 | |
| 2.0.0-preview2-final | 155,042 | 6/28/2017 | |
| 2.0.0-preview1-final | 58,758 | 5/10/2017 | |
| 1.1.2 | 17,659,157 | 5/9/2017 | |
| 1.1.1 | 5,114,742 | 3/6/2017 | |
| 1.1.0 | 3,771,191 | 11/16/2016 | |
| 1.1.0-preview1-final | 17,767 | 10/24/2016 | |
| 1.0.2 | 3,183,026 | 3/6/2017 | |
| 1.0.1 | 936,281 | 12/12/2016 | |
| 1.0.0 | 4,495,789 | 6/27/2016 | |
| 1.0.0-rc2-final | 42,539 | 5/16/2016 | |
| 1.0.0-rc1-final | 980,969 | 11/18/2015 |