Microsoft.Extensions.Configuration 10.0.0
About
Microsoft.Extensions.Configuration is combined with a core configuration abstraction under Microsoft.Extensions.Configuration.Abstractions that allows for building different kinds of configuration providers to retrieve key/value pair configuration values from in the form of IConfiguration. There are a number of built-in configuration provider implementations to read from environment variables, in-memory collections, JSON, INI or XML files. Aside from the built-in variations, there are more shipped libraries shipped by community for integration with various configuration service and other data sources.
Key Features
- In-memory configuration provider
- Chained configuration provider for chaining multiple confiugration providers together.
- Base types that implement configuration abstraction interfaces that can be used when implementing other configuration providers.
How to Use
using Microsoft.Extensions.Configuration;
var configurationBuilder = new ConfigurationBuilder();
configurationBuilder.AddInMemoryCollection(
new Dictionary<string, string?>
{
["Setting1"] = "value",
["MyOptions:Enabled"] = bool.TrueString,
});
configurationBuilder.AddInMemoryCollection(
new Dictionary<string, string?>
{
["Setting2"] = "value2",
["MyOptions:Enabled"] = bool.FalseString,
});
var config = configurationBuilder.Build();
// note case-insensitive
Console.WriteLine(config["setting1"]);
Console.WriteLine(config["setting2"]);
// note last in wins
Console.WriteLine(config["MyOptions:Enabled"]);
Main Types
The main types provided by this library are:
Microsoft.Extensions.Configuration.ConfigurationBuilderMicrosoft.Extensions.Configuration.ConfigurationManagerMicrosoft.Extensions.Configuration.ConfigurationRootMicrosoft.Extensions.Configuration.ConfigurationSection
Additional Documentation
Related Packages
- Microsoft.Extensions.Configuration.Binder
- Microsoft.Extensions.Configuration.CommandLine
- Microsoft.Extensions.Configuration.EnvironmentVariables
- Microsoft.Extensions.Configuration.FileExtensions
- Microsoft.Extensions.Configuration.Ini
- Microsoft.Extensions.Configuration.Json
- Microsoft.Extensions.Configuration.UserSecrets
- Microsoft.Extensions.Configuration.Xml
Feedback & Contributing
Microsoft.Extensions.Configuration is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Showing the top 20 packages that depend on Microsoft.Extensions.Configuration.
| Packages | Downloads |
|---|---|
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/be0a4a7f4cf06cbd6ec714bd1d9afee6bdb040a8
|
160 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
140 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
131 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
129 |
|
Microsoft.Extensions.Configuration.CommandLine
Command line configuration provider implementation for Microsoft.Extensions.Configuration.
|
124 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
123 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
This package was built from the source at:
https://github.com/aspnet/Hosting/tree/27e4e1aca3863389098b9be6dd9c5b7c030180b8
|
123 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
This package was built from the source at:
https://github.com/aspnet/Hosting/tree/687a99438a1a596a11b7dbd0bf9da5035b3b74eb
|
122 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
120 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
119 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
118 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
117 |
|
Microsoft.Extensions.Configuration.CommandLine
Command line configuration provider implementation for Microsoft.Extensions.Configuration.
This package was built from the source at:
https://github.com/aspnet/Configuration/tree/fd1c65b7e6b5aba9cfd0211634eb2322a386b349
|
117 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
116 |
|
Microsoft.Extensions.Configuration.CommandLine
Command line configuration provider implementation for Microsoft.Extensions.Configuration.
|
115 |
|
Microsoft.Extensions.Configuration.Binder
Functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration.
|
115 |
|
Microsoft.Extensions.Configuration.CommandLine
Command line configuration provider implementation for Microsoft.Extensions.Configuration.
|
114 |
|
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
113 |
.NET Framework 4.6.2
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Primitives (>= 10.0.0)
.NET 8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Primitives (>= 10.0.0)
.NET 9.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Primitives (>= 10.0.0)
.NET 10.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Primitives (>= 10.0.0)
.NET Standard 2.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Primitives (>= 10.0.0)
| Version | Downloads | Last updated |
|---|---|---|
| 10.0.0 | 20 | 11/11/2025 |
| 10.0.0-rc.2.25502.107 | 31 | 10/15/2025 |
| 10.0.0-rc.1.25451.107 | 38 | 9/10/2025 |
| 10.0.0-preview.7.25380.108 | 39 | 8/13/2025 |
| 10.0.0-preview.6.25358.103 | 43 | 7/16/2025 |
| 10.0.0-preview.5.25277.114 | 50 | 6/8/2025 |
| 10.0.0-preview.4.25258.110 | 53 | 5/14/2025 |
| 10.0.0-preview.3.25171.5 | 51 | 4/14/2025 |
| 10.0.0-preview.2.25163.2 | 55 | 3/22/2025 |
| 10.0.0-preview.1.25080.5 | 63 | 2/26/2025 |
| 9.0.11 | 13 | 11/11/2025 |
| 9.0.10 | 30 | 10/15/2025 |
| 9.0.9 | 33 | 9/10/2025 |
| 9.0.8 | 43 | 8/6/2025 |
| 9.0.7 | 45 | 7/11/2025 |
| 9.0.6 | 49 | 6/15/2025 |
| 9.0.5 | 52 | 5/14/2025 |
| 9.0.4 | 69 | 4/9/2025 |
| 9.0.3 | 64 | 3/16/2025 |
| 9.0.2 | 80 | 2/18/2025 |
| 9.0.1 | 71 | 1/18/2025 |
| 9.0.0 | 72 | 11/13/2024 |
| 9.0.0-rc.2.24473.5 | 65 | 10/21/2024 |
| 9.0.0-rc.1.24431.7 | 76 | 9/12/2024 |
| 9.0.0-preview.7.24405.7 | 68 | 8/14/2024 |
| 9.0.0-preview.6.24327.7 | 80 | 7/10/2024 |
| 9.0.0-preview.5.24306.7 | 71 | 6/15/2024 |
| 9.0.0-preview.4.24266.19 | 73 | 6/4/2024 |
| 9.0.0-preview.3.24172.9 | 82 | 4/19/2024 |
| 9.0.0-preview.2.24128.5 | 76 | 3/14/2024 |
| 9.0.0-preview.1.24080.9 | 77 | 3/2/2024 |
| 8.0.0 | 84 | 11/15/2023 |
| 8.0.0-rc.2.23479.6 | 82 | 10/28/2023 |
| 8.0.0-rc.1.23419.4 | 108 | 9/15/2023 |
| 8.0.0-preview.7.23375.6 | 93 | 8/9/2023 |
| 8.0.0-preview.6.23329.7 | 84 | 7/31/2023 |
| 8.0.0-preview.5.23280.8 | 116 | 7/30/2023 |
| 8.0.0-preview.4.23259.5 | 118 | 5/20/2023 |
| 8.0.0-preview.3.23174.8 | 112 | 5/12/2023 |
| 8.0.0-preview.2.23128.3 | 85 | 5/12/2023 |
| 8.0.0-preview.1.23110.8 | 115 | 3/21/2023 |
| 7.0.0 | 111 | 11/17/2022 |
| 7.0.0-rc.2.22472.3 | 102 | 10/11/2022 |
| 7.0.0-rc.1.22426.10 | 96 | 9/16/2022 |
| 7.0.0-preview.7.22375.6 | 98 | 11/5/2022 |
| 7.0.0-preview.6.22324.4 | 102 | 9/30/2022 |
| 7.0.0-preview.5.22301.12 | 107 | 6/27/2022 |
| 7.0.0-preview.4.22229.4 | 106 | 6/29/2022 |
| 7.0.0-preview.3.22175.4 | 89 | 6/29/2022 |
| 7.0.0-preview.2.22152.2 | 110 | 6/29/2022 |
| 7.0.0-preview.1.22076.8 | 104 | 6/29/2022 |
| 6.0.2 | 77 | 11/13/2024 |
| 6.0.2-mauipre.1.22102.15 | 99 | 6/29/2022 |
| 6.0.2-mauipre.1.22054.8 | 100 | 6/29/2022 |
| 6.0.1 | 95 | 6/29/2022 |
| 6.0.0 | 98 | 6/29/2022 |
| 6.0.0-rc.2.21480.5 | 79 | 6/29/2022 |
| 6.0.0-rc.1.21451.13 | 107 | 6/29/2022 |
| 6.0.0-preview.7.21377.19 | 109 | 6/29/2022 |
| 6.0.0-preview.6.21352.12 | 97 | 6/29/2022 |
| 6.0.0-preview.5.21301.5 | 113 | 6/29/2022 |
| 6.0.0-preview.4.21253.7 | 102 | 6/29/2022 |
| 6.0.0-preview.3.21201.4 | 118 | 6/29/2022 |
| 6.0.0-preview.2.21154.6 | 108 | 6/29/2022 |
| 6.0.0-preview.1.21102.12 | 96 | 6/29/2022 |
| 5.0.0 | 95 | 6/29/2022 |
| 5.0.0-rc.2.20475.5 | 102 | 6/29/2022 |
| 5.0.0-rc.1.20451.14 | 103 | 6/29/2022 |
| 5.0.0-preview.8.20407.11 | 78 | 6/29/2022 |
| 5.0.0-preview.7.20364.11 | 94 | 6/29/2022 |
| 5.0.0-preview.6.20305.6 | 102 | 6/29/2022 |
| 5.0.0-preview.5.20278.1 | 83 | 6/29/2022 |
| 5.0.0-preview.4.20251.6 | 99 | 6/29/2022 |
| 5.0.0-preview.3.20215.2 | 111 | 6/29/2022 |
| 5.0.0-preview.2.20160.3 | 100 | 6/29/2022 |
| 5.0.0-preview.1.20120.4 | 112 | 6/29/2022 |
| 3.1.32 | 94 | 2/21/2023 |
| 3.1.31 | 105 | 12/3/2022 |
| 3.1.30 | 97 | 11/7/2022 |
| 3.1.29 | 136 | 10/25/2022 |
| 3.1.28 | 136 | 10/3/2022 |
| 3.1.27 | 117 | 10/9/2022 |
| 3.1.26 | 101 | 6/29/2022 |
| 3.1.25 | 88 | 6/29/2022 |
| 3.1.24 | 102 | 6/29/2022 |
| 3.1.23 | 93 | 6/29/2022 |
| 3.1.22 | 109 | 6/29/2022 |
| 3.1.21 | 103 | 6/29/2022 |
| 3.1.20 | 112 | 6/29/2022 |
| 3.1.19 | 103 | 6/29/2022 |
| 3.1.18 | 112 | 6/29/2022 |
| 3.1.17 | 102 | 6/29/2022 |
| 3.1.16 | 94 | 6/29/2022 |
| 3.1.15 | 108 | 6/29/2022 |
| 3.1.14 | 89 | 6/29/2022 |
| 3.1.13 | 110 | 6/30/2022 |
| 3.1.12 | 94 | 6/29/2022 |
| 3.1.11 | 100 | 6/30/2022 |
| 3.1.10 | 102 | 6/29/2022 |
| 3.1.9 | 117 | 6/29/2022 |
| 3.1.8 | 92 | 6/29/2022 |
| 3.1.7 | 118 | 6/29/2022 |
| 3.1.6 | 100 | 6/29/2022 |
| 3.1.5 | 102 | 6/29/2022 |
| 3.1.4 | 108 | 6/29/2022 |
| 3.1.3 | 102 | 6/29/2022 |
| 3.1.2 | 117 | 6/29/2022 |
| 3.1.1 | 88 | 6/29/2022 |
| 3.1.0 | 98 | 6/29/2022 |
| 3.1.0-preview3.19553.2 | 94 | 6/29/2022 |
| 3.1.0-preview2.19525.4 | 98 | 6/29/2022 |
| 3.1.0-preview1.19506.1 | 101 | 6/29/2022 |
| 3.0.3 | 109 | 6/29/2022 |
| 3.0.2 | 118 | 6/29/2022 |
| 3.0.1 | 95 | 6/29/2022 |
| 3.0.0 | 118 | 6/29/2022 |
| 3.0.0-rc1.19456.10 | 97 | 6/29/2022 |
| 3.0.0-preview9.19423.4 | 81 | 6/29/2022 |
| 3.0.0-preview8.19405.4 | 111 | 6/29/2022 |
| 3.0.0-preview7.19362.4 | 94 | 6/29/2022 |
| 3.0.0-preview6.19304.6 | 102 | 6/29/2022 |
| 3.0.0-preview5.19227.9 | 101 | 6/29/2022 |
| 3.0.0-preview4.19216.2 | 106 | 6/29/2022 |
| 3.0.0-preview3.19153.1 | 88 | 6/29/2022 |
| 3.0.0-preview.19074.2 | 110 | 6/29/2022 |
| 3.0.0-preview.18572.1 | 101 | 6/29/2022 |
| 2.2.0 | 104 | 6/29/2022 |
| 2.2.0-preview3-35497 | 113 | 6/29/2022 |
| 2.2.0-preview2-35157 | 109 | 6/29/2022 |
| 2.2.0-preview1-35029 | 94 | 6/29/2022 |
| 2.1.1 | 94 | 6/29/2022 |
| 2.1.0 | 102 | 6/29/2022 |
| 2.1.0-rc1-final | 87 | 6/29/2022 |
| 2.1.0-preview2-final | 106 | 6/29/2022 |
| 2.1.0-preview1-final | 112 | 6/29/2022 |
| 2.0.2 | 106 | 6/29/2022 |
| 2.0.1 | 125 | 6/29/2022 |
| 2.0.0 | 92 | 6/29/2022 |
| 2.0.0-preview2-final | 104 | 6/29/2022 |
| 2.0.0-preview1-final | 105 | 6/29/2022 |
| 1.1.2 | 89 | 6/30/2022 |
| 1.1.1 | 98 | 6/29/2022 |
| 1.1.0 | 104 | 6/30/2022 |
| 1.1.0-preview1-final | 82 | 6/30/2022 |
| 1.0.2 | 105 | 6/30/2022 |
| 1.0.1 | 111 | 6/30/2022 |
| 1.0.0 | 110 | 6/30/2022 |
| 1.0.0-rc2-final | 83 | 6/30/2022 |
| 1.0.0-rc1-final | 109 | 6/30/2022 |