Microsoft.Extensions.Configuration 9.0.0-rc.2.24473.5

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
Functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration.
264
Microsoft.Extensions.Configuration.Binder
Functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration.
10,006
Microsoft.Extensions.Configuration.Binder
Functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration.
10,027
Microsoft.Extensions.Configuration.Binder
Functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration.
25,240
Microsoft.Extensions.Configuration.EnvironmentVariables
Environment variables configuration provider implementation for Microsoft.Extensions.Configuration.
10,018
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.
2,001
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration.
10,002
Microsoft.Extensions.Configuration.FileExtensions
Extension methods for configuring file-based configuration providers for Microsoft.Extensions.Configuration. When using NuGet 3.x this package requires at least version 3.4.
1,812
Microsoft.Extensions.Configuration.Json
JSON configuration provider implementation for Microsoft.Extensions.Configuration.
2,007
Microsoft.Extensions.Configuration.Json
JSON configuration provider implementation for Microsoft.Extensions.Configuration.
10,019
Microsoft.Extensions.Configuration.Json
JSON configuration provider implementation for Microsoft.Extensions.Configuration. When using NuGet 3.x this package requires at least version 3.4.
1,797
Winton.Extensions.Configuration.Consul
Provides support for configuring .NET Core applications with Consul
86
Winton.Extensions.Configuration.Consul
Provides support for configuring .NET Core applications with Consul
87
Winton.Extensions.Configuration.Consul
Provides support for configuring .NET Core applications with Consul
88
Winton.Extensions.Configuration.Consul
Provides support for configuring .NET Core applications with Consul
90
Winton.Extensions.Configuration.Consul
Provides support for configuring .NET Core applications with Consul
92
Winton.Extensions.Configuration.Consul
Provides support for configuring .NET Core applications with Consul
93
Winton.Extensions.Configuration.Consul
Provides support for configuring .NET Core applications with Consul
97
Winton.Extensions.Configuration.Consul
Provides support for configuring .NET Core applications with Consul
10,044

https://go.microsoft.com/fwlink/?LinkID=799421

.NET Framework 4.6.2

.NET 8.0

.NET 9.0

.NET Standard 2.0

Version Downloads Last updated
9.0.0-rc.2.24473.5 7 10/15/2024
9.0.0-rc.1.24431.7 9 09/16/2024
9.0.0-preview.7.24405.7 8 08/14/2024
9.0.0-preview.6.24327.7 6 07/14/2024
9.0.0-preview.5.24306.7 8 06/14/2024
9.0.0-preview.4.24266.19 7 05/22/2024
9.0.0-preview.3.24172.9 8 04/24/2024
9.0.0-preview.2.24128.5 5 03/15/2024
9.0.0-preview.1.24080.9 9 02/25/2024
8.0.0 14 11/14/2023
8.0.0-rc.2.23479.6 13 10/10/2023
8.0.0-rc.1.23419.4 15 09/13/2023
8.0.0-preview.7.23375.6 20 08/15/2023
8.0.0-preview.6.23329.7 15 09/13/2023
8.0.0-preview.5.23280.8 13 06/18/2023
8.0.0-preview.4.23259.5 18 05/26/2023
8.0.0-preview.3.23174.8 16 06/21/2023
8.0.0-preview.2.23128.3 18 04/02/2023
8.0.0-preview.1.23110.8 14 04/02/2023
7.0.0 1,558 11/15/2022
7.0.0-rc.2.22472.3 17 10/15/2022
7.0.0-rc.1.22426.10 12 09/23/2022
7.0.0-preview.7.22375.6 19 09/24/2022
7.0.0-preview.6.22324.4 18 09/24/2022
7.0.0-preview.5.22301.12 21 09/23/2022
7.0.0-preview.4.22229.4 31 07/01/2022
7.0.0-preview.3.22175.4 21 07/05/2022
7.0.0-preview.2.22152.2 16 10/16/2022
7.0.0-preview.1.22076.8 19 10/16/2022
6.0.2-mauipre.1.22102.15 12 09/21/2022
6.0.2-mauipre.1.22054.8 22 09/24/2022
6.0.1 10,447 09/22/2022
6.0.0 12 09/21/2022
6.0.0-rc.2.21480.5 23 09/24/2022
6.0.0-rc.1.21451.13 18 09/21/2022
6.0.0-preview.7.21377.19 21 10/16/2022
6.0.0-preview.6.21352.12 14 09/22/2022
6.0.0-preview.5.21301.5 17 10/16/2022
6.0.0-preview.4.21253.7 23 10/16/2022
6.0.0-preview.3.21201.4 18 08/13/2022
6.0.0-preview.2.21154.6 17 09/22/2022
6.0.0-preview.1.21102.12 18 10/16/2022
5.0.0 12,967 06/27/2022
5.0.0-rc.2.20475.5 17 09/22/2022
5.0.0-rc.1.20451.14 19 09/23/2022
5.0.0-preview.8.20407.11 23 07/04/2022
5.0.0-preview.7.20364.11 14 09/24/2022
5.0.0-preview.6.20305.6 13 08/04/2022
5.0.0-preview.5.20278.1 17 09/21/2022
5.0.0-preview.4.20251.6 16 10/16/2022
5.0.0-preview.3.20215.2 15 09/23/2022
5.0.0-preview.2.20160.3 19 10/16/2022
5.0.0-preview.1.20120.4 18 09/21/2022
3.1.32 12 01/13/2023
3.1.31 15 01/13/2023
3.1.30 15 10/16/2022
3.1.29 15 09/21/2022
3.1.28 17 09/21/2022
3.1.27 20 09/23/2022
3.1.26 13 10/16/2022
3.1.25 23 07/13/2022
3.1.24 15 10/16/2022
3.1.23 18 06/27/2022
3.1.22 18 10/16/2022
3.1.21 19 09/25/2022
3.1.20 19 07/23/2022
3.1.19 18 10/16/2022
3.1.18 19 07/07/2022
3.1.17 14 10/16/2022
3.1.16 19 09/06/2022
3.1.15 17 09/21/2022
3.1.14 18 09/21/2022
3.1.13 19 07/21/2022
3.1.12 18 06/30/2022
3.1.11 16 06/27/2022
3.1.10 19 07/13/2022
3.1.9 12 10/16/2022
3.1.8 13 10/16/2022
3.1.7 14 09/27/2022
3.1.6 16 06/28/2022
3.1.5 1,959 06/27/2022
3.1.4 15 09/21/2022
3.1.3 1,953 06/27/2022
3.1.2 14 07/07/2022
3.1.1 15 07/17/2022
3.1.0 2,248 06/27/2022
3.1.0-preview3.19553.2 19 08/16/2022
3.1.0-preview2.19525.4 16 10/16/2022
3.1.0-preview1.19506.1 21 09/21/2022
3.0.3 16 09/22/2022
3.0.2 15 09/22/2022
3.0.1 18 09/18/2022
3.0.0 1,955 06/27/2022
3.0.0-rc1.19456.10 22 07/07/2022
3.0.0-preview9.19423.4 12 09/23/2022
3.0.0-preview8.19405.4 18 07/02/2022
3.0.0-preview7.19362.4 20 07/29/2022
3.0.0-preview6.19304.6 16 10/16/2022
3.0.0-preview5.19227.9 18 07/21/2022
3.0.0-preview4.19216.2 20 06/29/2022
3.0.0-preview3.19153.1 23 07/18/2022
3.0.0-preview.19074.2 25 07/04/2022
3.0.0-preview.18572.1 20 09/21/2022
2.2.0 15 07/01/2022
2.2.0-preview3-35497 18 09/21/2022
2.2.0-preview2-35157 21 07/02/2022
2.2.0-preview1-35029 26 09/23/2022
2.1.1 1,954 06/27/2022
2.1.0 18 06/27/2022
2.1.0-rc1-final 14 09/22/2022
2.1.0-preview2-final 13 10/16/2022
2.1.0-preview1-final 22 10/16/2022
2.0.2 16 09/21/2022
2.0.1 19 09/24/2022
2.0.0 11,153 06/27/2022
2.0.0-preview2-final 38 07/06/2022
2.0.0-preview1-final 30 07/07/2022
1.1.2 18 07/02/2022
1.1.1 17 09/22/2022
1.1.0 15 09/27/2022
1.1.0-preview1-final 16 10/16/2022
1.0.2 12 10/16/2022
1.0.1 17 09/24/2022
1.0.0 23 06/29/2022
1.0.0-rc2-final 15 09/21/2022
1.0.0-rc1-final 18 07/21/2022