Microsoft.Extensions.Configuration
                              
                            
                                10.0.0-preview.7.25380.108
                            
                        
                            
                                
                                
                                    Prefix Reserved
                                
                            
                    See the version list below for details.
dotnet add package Microsoft.Extensions.Configuration --version 10.0.0-preview.7.25380.108
NuGet\Install-Package Microsoft.Extensions.Configuration -Version 10.0.0-preview.7.25380.108
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0-preview.7.25380.108" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.0-preview.7.25380.108" />
<PackageReference Include="Microsoft.Extensions.Configuration" />
paket add Microsoft.Extensions.Configuration --version 10.0.0-preview.7.25380.108
#r "nuget: Microsoft.Extensions.Configuration, 10.0.0-preview.7.25380.108"
#:package Microsoft.Extensions.Configuration@10.0.0-preview.7.25380.108
#addin nuget:?package=Microsoft.Extensions.Configuration&version=10.0.0-preview.7.25380.108&prerelease
#tool nuget:?package=Microsoft.Extensions.Configuration&version=10.0.0-preview.7.25380.108&prerelease
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.ConfigurationBuilder
- Microsoft.Extensions.Configuration.ConfigurationManager
- Microsoft.Extensions.Configuration.ConfigurationRoot
- Microsoft.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.
| Product | Versions Compatible and additional computed target framework versions. | 
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 is compatible. 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 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. | 
| .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 (>= 10.0.0-preview.7.25380.108)
- Microsoft.Extensions.Primitives (>= 10.0.0-preview.7.25380.108)
 
- 
                                                    .NETStandard 2.0- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0-preview.7.25380.108)
- Microsoft.Extensions.Primitives (>= 10.0.0-preview.7.25380.108)
 
- 
                                                    net10.0- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0-preview.7.25380.108)
- Microsoft.Extensions.Primitives (>= 10.0.0-preview.7.25380.108)
 
- 
                                                    net8.0- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0-preview.7.25380.108)
- Microsoft.Extensions.Primitives (>= 10.0.0-preview.7.25380.108)
 
- 
                                                    net9.0- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.0-preview.7.25380.108)
- Microsoft.Extensions.Primitives (>= 10.0.0-preview.7.25380.108)
 
GitHub repositories (626)
Showing the top 20 popular GitHub repositories that depend on Microsoft.Extensions.Configuration:
| Repository | Stars | 
|---|---|
| microsoft/semantic-kernel 
                                                            Integrate cutting-edge LLM technology quickly and easily into your apps
                                                         | |
| icsharpcode/ILSpy 
                                                            .NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
                                                         | |
| dotnet/maui 
                                                            .NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
                                                         | |
| dotnet/roslyn 
                                                            The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
                                                         | |
| ardalis/CleanArchitecture 
                                                            Clean Architecture Solution Template: A proven Clean Architecture Template for ASP.NET Core 9
                                                         | |
| bitwarden/server 
                                                            Bitwarden infrastructure/backend (API, database, Docker, etc).
                                                         | |
| dotnet/efcore 
                                                            EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
                                                         | |
| Jackett/Jackett 
                                                            API Support for your favorite torrent trackers
                                                         | |
| App-vNext/Polly 
                                                            Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.
                                                         | |
| dotnet/AspNetCore.Docs 
                                                            Documentation for ASP.NET Core
                                                         | |
| Sonarr/Sonarr 
                                                            Smart PVR for newsgroup and bittorrent users.
                                                         | |
| Radarr/Radarr 
                                                            Movie organizer/manager for usenet and torrent users.
                                                         | |
| d2phap/ImageGlass 
                                                            🏞 A lightweight, versatile image viewer
                                                         | |
| chocolatey/choco 
                                                            Chocolatey - the package manager for Windows
                                                         | |
| dotnet/orleans 
                                                            Cloud Native application framework for .NET
                                                         | |
| Tyrrrz/DiscordChatExporter 
                                                            Saves Discord chat logs to a file
                                                         | |
| JeffreySu/WeiXinMPSDK 
                                                            微信全平台 .NET SDK, Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 8.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
                                                         | 
| Version | Downloads | Last Updated | 
|---|---|---|
| 10.0.0-rc.2.25466.103 | 0 | 9/22/2025 | 
| 10.0.0-rc.1.25451.107 | 0 | 9/22/2025 | 
| 10.0.0-rc.1.25421.113 | 0 | 8/28/2025 | 
| 10.0.0-preview.7.25380.108 | 0 | 8/11/2025 | 
| 10.0.0-preview.7.25380.105 | 0 | 8/6/2025 | 
| 10.0.0-preview.6.25358.103 | 0 | 7/17/2025 | 
| 10.0.0-preview.6.25321.102 | 0 | 6/25/2025 | 
| 10.0.0-preview.5.25280.105 | 0 | 6/2/2025 | 
| 10.0.0-preview.5.25277.114 | 0 | 6/3/2025 | 
| 10.0.0-preview.5.25277.101 | 0 | 5/29/2025 | 
| 10.0.0-preview.5.25266.103 | 0 | 5/20/2025 | 
| 10.0.0-preview.4.25255.103 | 0 | 5/12/2025 | 
| 9.0.10 | 1 | 9/23/2025 | 
| 9.0.7 | 22 | 7/11/2025 | 
| 3.0.0-preview.19074.2 | 5 | 1/28/2019 | 
| 3.0.0-preview.18572.1 | 2 | 11/30/2018 |