Microsoft.Extensions.Configuration.EnvironmentVariables 9.0.1

About

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.

How to Use

The following example shows how to read application configuration from environment variables.

using System;
using Microsoft.Extensions.Configuration;

class Program
{
    static void Main()
    {
        // Build a configuration object from environment variables
        IConfiguration config = new ConfigurationBuilder()
            .AddEnvironmentVariables()
            .Build();
        
        // Read configuration values
        Console.WriteLine($"Server: {config["Server"]}");
        Console.WriteLine($"Database: {config["Database"]}");
    }
}

Additional Documentation

Feedback & Contributing

Microsoft.Extensions.Configuration.EnvironmentVariables 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.EnvironmentVariables.

Packages Downloads
SkyAPM.Utilities.Configuration
SkyAPM configuration extensions.
2,880
SkyAPM.Utilities.Configuration
SkyAPM configuration extensions.
1,427
SkyAPM.Utilities.Configuration
SkyAPM configuration extensions.
894
SkyAPM.Utilities.Configuration
SkyAPM configuration extensions.
441
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
339
Microsoft.AspNetCore
Microsoft.AspNetCore
338
SkyAPM.Utilities.Configuration
SkyAPM configuration extensions.
113
Microsoft.AspNetCore
Microsoft.AspNetCore
56
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/Hosting/tree/0724e6cde1149ee1a19bfec9c13a2c9327b71213
53
Microsoft.AspNetCore
Microsoft.AspNetCore
52
SkyAPM.Utilities.Configuration
SkyAPM configuration extensions.
51
Microsoft.AspNetCore
Microsoft.AspNetCore
51
Microsoft.AspNetCore
Microsoft.AspNetCore
50
Microsoft.AspNetCore
Microsoft.AspNetCore
49
Microsoft.AspNetCore
Microsoft.AspNetCore
48
Microsoft.AspNetCore
Microsoft.AspNetCore
47

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

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