Microsoft.Extensions.Configuration 11.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.ConfigurationBuilder
  • Microsoft.Extensions.Configuration.ConfigurationManager
  • Microsoft.Extensions.Configuration.ConfigurationRoot
  • Microsoft.Extensions.Configuration.ConfigurationSection

Additional Documentation

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.Extensions.Configuration.Binder
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.
2,348
Microsoft.Extensions.Logging.Configuration
Configuration support for Microsoft.Extensions.Logging.
2,336
DotNetEnv
A .NET library to load environment variables from .env files
2,319
OpenTelemetry.Instrumentation.Http
HTTP instrumentation for OpenTelemetry .NET.
2,310
Microsoft.Extensions.Configuration.Binder
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.
2,308
OpenTelemetry.Instrumentation.EntityFrameworkCore
Microsoft.EntityFrameworkCore instrumentation for OpenTelemetry .NET.
2,303
OpenTelemetry.Instrumentation.AspNetCore
ASP.NET Core instrumentation for OpenTelemetry .NET
2,298
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
2,297
Microsoft.Extensions.Configuration.CommandLine
Command line configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read configuration parameters from the command line arguments of your application. You can use CommandLineConfigurationExtensions.AddCommandLine extension method on IConfigurationBuilder to add the command line configuration provider to the configuration builder.
2,293
Microsoft.Extensions.Configuration.Json
JSON configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read your application's settings from a JSON file. You can use JsonConfigurationExtensions.AddJsonFile extension method on IConfigurationBuilder to add the JSON configuration provider to the configuration builder.
2,286
Microsoft.Extensions.Configuration.FileExtensions
Provides a base class for file-based configuration providers used with Microsoft.Extensions.Configuration and extension methods for configuring them.
2,281
Microsoft.Extensions.Logging.Configuration
Configuration support for Microsoft.Extensions.Logging.
2,279
Microsoft.Extensions.Diagnostics
This package includes the default implementation of IMeterFactory and additional extension methods to easily register it with the Dependency Injection framework.
2,278
Microsoft.Extensions.Configuration.EnvironmentVariables
Environment variables configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read configuration parameters from environment variables. You can use EnvironmentVariablesExtensions.AddEnvironmentVariables extension method on IConfigurationBuilder to add the environment variables configuration provider to the configuration builder.
2,278
OpenTelemetry.Instrumentation.AspNetCore
ASP.NET Core instrumentation for OpenTelemetry .NET
224
Microsoft.Extensions.Configuration.EnvironmentVariables
Environment variables configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read configuration parameters from environment variables. You can use EnvironmentVariablesExtensions.AddEnvironmentVariables extension method on IConfigurationBuilder to add the environment variables configuration provider to the configuration builder.
222
Microsoft.Extensions.Diagnostics
This package includes the default implementation of IMeterFactory and additional extension methods to easily register it with the Dependency Injection framework.
191
Microsoft.Extensions.Configuration.EnvironmentVariables
Environment variables configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read configuration parameters from environment variables. You can use EnvironmentVariablesExtensions.AddEnvironmentVariables extension method on IConfigurationBuilder to add the environment variables configuration provider to the configuration builder.
182
Microsoft.Extensions.Configuration.Binder
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.
175
Microsoft.Extensions.Configuration.CommandLine
Command line configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read configuration parameters from the command line arguments of your application. You can use CommandLineConfigurationExtensions.AddCommandLine extension method on IConfigurationBuilder to add the command line configuration provider to the configuration builder.
173

Version Downloads Last updated
11.0.0 12 11/10/2026
11.0.0-rc.3.26522.148 16 10/25/2026
11.0.0-rc.2.26504.105 16 10/14/2026
11.0.0-rc.1.26425.128 26 09/11/2026
11.0.0-preview.7.26381.103 30 08/12/2026
11.0.0-preview.6.26359.118 31 07/15/2026
11.0.0-preview.5.26302.115 37 06/11/2026
11.0.0-preview.4.26230.115 40 05/13/2026
11.0.0-preview.3.26207.106 52 04/15/2026
11.0.0-preview.2.26159.112 55 03/11/2026
11.0.0-preview.1.26104.118 50 02/12/2026
10.0.15 10 11/10/2026
10.0.14 18 10/25/2026
10.0.13 28 10/14/2026
10.0.12 19 09/11/2026
10.0.11 177 08/12/2026
10.0.10 25 07/15/2026
10.0.9 37 06/11/2026
10.0.8 45 05/13/2026
10.0.7 2,288 04/23/2026
10.0.6 63 04/16/2026
10.0.5 64 03/13/2026
10.0.4 60 03/10/2026
10.0.3 133 02/12/2026
10.0.2 76 01/14/2026
10.0.1 14 09/29/2026
10.0.0 2,379 12/18/2025
10.0.0-rc.2.25502.107 46 12/17/2025
10.0.0-rc.1.25451.107 60 12/13/2025
10.0.0-preview.7.25380.108 11 09/30/2026
10.0.0-preview.6.25358.103 56 12/19/2025
10.0.0-preview.5.25277.114 53 12/11/2025
10.0.0-preview.4.25258.110 57 12/20/2025
10.0.0-preview.3.25171.5 46 12/15/2025
10.0.0-preview.2.25163.2 73 12/14/2025
10.0.0-preview.1.25080.5 60 12/14/2025
9.0.23 8 11/10/2026
9.0.22 14 10/25/2026
9.0.21 20 10/14/2026
9.0.20 22 09/11/2026
9.0.19 30 08/12/2026
9.0.18 27 07/15/2026
9.0.17 27 06/11/2026
9.0.16 30 05/13/2026
9.0.15 51 04/15/2026
9.0.14 54 03/10/2026
9.0.13 69 02/12/2026
9.0.12 64 01/14/2026
9.0.11 67 12/11/2025
9.0.10 73 12/11/2025
9.0.9 14 10/03/2026
9.0.8 55 12/13/2025
9.0.7 62 12/11/2025
9.0.6 60 12/14/2025
9.0.5 67 12/14/2025
9.0.4 61 12/13/2025
9.0.3 68 12/14/2025
9.0.2 65 01/08/2026
9.0.1 57 12/13/2025
9.0.0 16 10/07/2026
9.0.0-rc.2.24473.5 19 09/30/2026
9.0.0-rc.1.24431.7 52 12/14/2025
9.0.0-preview.7.24405.7 64 12/21/2025
9.0.0-preview.6.24327.7 53 12/14/2025
9.0.0-preview.5.24306.7 53 12/12/2025
9.0.0-preview.4.24266.19 20 10/01/2026
9.0.0-preview.3.24172.9 41 12/14/2025
9.0.0-preview.2.24128.5 61 12/14/2025
9.0.0-preview.1.24080.9 55 12/20/2025
8.0.0 140 09/28/2026
8.0.0-rc.2.23479.6 47 12/21/2025
8.0.0-rc.1.23419.4 14 10/06/2026
8.0.0-preview.7.23375.6 53 12/14/2025
8.0.0-preview.6.23329.7 52 12/19/2025
8.0.0-preview.5.23280.8 44 12/13/2025
8.0.0-preview.4.23259.5 59 12/11/2025
8.0.0-preview.3.23174.8 50 12/14/2025
8.0.0-preview.2.23128.3 17 10/06/2026
8.0.0-preview.1.23110.8 43 12/19/2025
7.0.0 66 12/12/2025
7.0.0-rc.2.22472.3 53 12/21/2025
7.0.0-rc.1.22426.10 16 09/29/2026
7.0.0-preview.7.22375.6 52 12/14/2025
7.0.0-preview.6.22324.4 40 12/14/2025
7.0.0-preview.5.22301.12 21 09/28/2026
7.0.0-preview.4.22229.4 60 12/12/2025
7.0.0-preview.3.22175.4 49 12/14/2025
7.0.0-preview.2.22152.2 54 12/20/2025
7.0.0-preview.1.22076.8 50 12/14/2025
6.0.2 27 09/28/2026
6.0.2-mauipre.1.22102.15 61 12/23/2025
6.0.2-mauipre.1.22054.8 63 12/14/2025
6.0.1 20 09/28/2026
6.0.0 112 12/11/2025
6.0.0-rc.2.21480.5 61 12/19/2025
6.0.0-rc.1.21451.13 57 12/12/2025
6.0.0-preview.7.21377.19 13 10/11/2026
6.0.0-preview.6.21352.12 60 12/21/2025
6.0.0-preview.5.21301.5 53 12/21/2025
6.0.0-preview.4.21253.7 60 12/14/2025
6.0.0-preview.3.21201.4 39 12/14/2025
6.0.0-preview.2.21154.6 46 12/14/2025
6.0.0-preview.1.21102.12 57 12/14/2025
5.0.0 57 01/10/2026
5.0.0-rc.2.20475.5 56 12/12/2025
5.0.0-rc.1.20451.14 57 12/21/2025
5.0.0-preview.8.20407.11 14 09/30/2026
5.0.0-preview.7.20364.11 52 12/14/2025
5.0.0-preview.6.20305.6 62 12/15/2025
5.0.0-preview.5.20278.1 56 12/14/2025
5.0.0-preview.4.20251.6 23 09/28/2026
5.0.0-preview.3.20215.2 57 12/14/2025
5.0.0-preview.2.20160.3 53 12/13/2025
5.0.0-preview.1.20120.4 63 12/14/2025
3.1.32 55 01/01/2026
3.1.31 69 12/19/2025
3.1.30 46 12/30/2025
3.1.29 62 01/01/2026
3.1.28 51 12/11/2025
3.1.27 45 12/31/2025
3.1.26 53 12/14/2025
3.1.25 57 12/15/2025
3.1.24 44 01/09/2026
3.1.23 60 01/03/2026
3.1.22 69 12/15/2025
3.1.21 52 01/04/2026
3.1.20 57 12/14/2025
3.1.19 40 01/01/2026
3.1.18 23 09/29/2026
3.1.17 52 12/22/2025
3.1.16 51 12/22/2025
3.1.15 37 12/22/2025
3.1.14 66 01/02/2026
3.1.13 58 12/11/2025
3.1.12 58 01/01/2026
3.1.11 51 01/09/2026
3.1.10 60 12/15/2025
3.1.9 56 01/08/2026
3.1.8 58 12/16/2025
3.1.7 61 12/15/2025
3.1.6 63 12/14/2025
3.1.5 47 12/30/2025
3.1.4 58 12/13/2025
3.1.3 13 10/07/2026
3.1.2 56 12/14/2025
3.1.1 63 12/20/2025
3.1.0 67 12/20/2025
3.1.0-preview3.19553.2 42 12/21/2025
3.1.0-preview2.19525.4 60 12/21/2025
3.1.0-preview1.19506.1 60 12/15/2025
3.0.3 65 12/14/2025
3.0.2 74 12/14/2025
3.0.1 60 12/22/2025
3.0.0 54 12/29/2025
3.0.0-rc1.19456.10 59 12/20/2025
3.0.0-preview9.19423.4 58 12/21/2025
3.0.0-preview8.19405.4 55 12/21/2025
3.0.0-preview7.19362.4 20 10/24/2026
3.0.0-preview6.19304.6 49 12/21/2025
3.0.0-preview5.19227.9 62 12/20/2025
3.0.0-preview4.19216.2 59 12/21/2025
3.0.0-preview3.19153.1 59 12/21/2025
3.0.0-preview.19074.2 16 10/20/2026
3.0.0-preview.18572.1 48 12/14/2025
2.2.0 59 12/20/2025
2.2.0-preview3-35497 57 12/21/2025
2.2.0-preview2-35157 51 12/11/2025
2.2.0-preview1-35029 48 12/21/2025
2.1.1 19 09/28/2026
2.1.0 63 12/15/2025
2.1.0-rc1-final 62 12/14/2025
2.1.0-preview2-final 66 12/14/2025
2.1.0-preview1-final 57 12/20/2025
2.0.2 54 12/20/2025
2.0.1 65 12/21/2025
2.0.0 70 12/20/2025
2.0.0-preview2-final 55 12/20/2025
2.0.0-preview1-final 52 12/14/2025
1.1.2 940 09/28/2026
1.1.1 58 12/20/2025
1.1.0 55 12/20/2025
1.1.0-preview1-final 15 10/05/2026
1.0.2 68 12/14/2025
1.0.1 44 12/17/2025
1.0.0 68 12/13/2025
1.0.0-rc2-final 59 12/21/2025
1.0.0-rc1-final 70 12/14/2025