Microsoft.Extensions.Configuration.EnvironmentVariables 10.0.0

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
Microsoft.AspNetCore
Microsoft.AspNetCore
90
Microsoft.AspNetCore
Microsoft.AspNetCore
97
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
92
Microsoft.AspNetCore.AzureAppServices.HostingStartup
ASP.NET Core lightup integration with Azure AppServices. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/2e51a0b6eba74bdf02aee71944e973487937cb99
96
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
93
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
101
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/c3edce8e8a19a1e2e58fd21a986271b88071e6ba
92
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
91
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
92
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
92
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
93
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
96
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
99
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications. This package was built from the source code at https://github.com/aspnet/Extensions/tree/0de62ae930da31048ba7e54c8cd0c6c0bcbd9095
92
Microsoft.Extensions.Logging.AzureAppServices
Logger implementation to support Azure App Services 'Diagnostics logs' and 'Log stream' features. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/371a26f07b23ad77c636332c2dfc0cbd1d8137ba
94

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

Version Downloads Last updated
10.0.0 5 11/12/2025
10.0.0-rc.2.25502.107 18 10/15/2025
10.0.0-rc.1.25451.107 21 09/11/2025
10.0.0-preview.7.25380.108 37 08/14/2025
10.0.0-preview.6.25358.103 44 07/15/2025
10.0.0-preview.5.25277.114 45 06/07/2025
10.0.0-preview.4.25258.110 50 05/16/2025
10.0.0-preview.3.25171.5 57 04/14/2025
10.0.0-preview.2.25163.2 50 04/01/2025
10.0.0-preview.1.25080.5 49 04/01/2025
9.0.11 6 11/12/2025
9.0.10 18 10/15/2025
9.0.9 24 09/11/2025
9.0.8 40 08/07/2025
9.0.7 44 07/09/2025
9.0.6 46 06/12/2025
9.0.5 56 05/19/2025
9.0.4 61 04/10/2025
9.0.3 57 04/02/2025
9.0.2 56 04/02/2025
9.0.1 58 04/02/2025
9.0.0 58 11/14/2024
9.0.0-rc.2.24473.5 57 10/20/2024
9.0.0-rc.1.24431.7 61 09/20/2024
9.0.0-preview.7.24405.7 59 08/20/2024
9.0.0-preview.6.24327.7 71 07/18/2024
9.0.0-preview.5.24306.7 81 07/18/2024
9.0.0-preview.4.24266.19 77 07/18/2024
9.0.0-preview.3.24172.9 70 07/18/2024
9.0.0-preview.2.24128.5 72 07/18/2024
9.0.0-preview.1.24080.9 72 07/18/2024
8.0.0 102 04/17/2024
8.0.0-rc.2.23479.6 78 07/18/2024
8.0.0-rc.1.23419.4 81 07/18/2024
8.0.0-preview.7.23375.6 65 07/18/2024
8.0.0-preview.6.23329.7 80 07/18/2024
8.0.0-preview.5.23280.8 79 07/18/2024
8.0.0-preview.4.23259.5 80 07/18/2024
8.0.0-preview.3.23174.8 76 07/18/2024
8.0.0-preview.2.23128.3 70 07/18/2024
8.0.0-preview.1.23110.8 84 07/18/2024
7.0.0 86 07/18/2024
7.0.0-rc.2.22472.3 73 07/18/2024
7.0.0-rc.1.22426.10 79 07/18/2024
7.0.0-preview.7.22375.6 72 07/18/2024
7.0.0-preview.6.22324.4 76 07/18/2024
7.0.0-preview.5.22301.12 75 07/18/2024
7.0.0-preview.4.22229.4 84 07/18/2024
7.0.0-preview.3.22175.4 87 07/18/2024
7.0.0-preview.2.22152.2 69 07/18/2024
7.0.0-preview.1.22076.8 72 07/18/2024
6.0.2 52 11/14/2024
6.0.2-mauipre.1.22102.15 31 08/04/2025
6.0.1 76 07/18/2024
6.0.0 95 07/18/2024
6.0.0-rc.2.21480.5 78 07/18/2024
6.0.0-rc.1.21451.13 80 07/14/2024
6.0.0-preview.7.21377.19 79 07/18/2024
6.0.0-preview.6.21352.12 82 07/18/2024
6.0.0-preview.5.21301.5 89 07/18/2024
6.0.0-preview.4.21253.7 70 07/18/2024
6.0.0-preview.3.21201.4 87 07/18/2024
6.0.0-preview.2.21154.6 80 07/18/2024
6.0.0-preview.1.21102.12 82 07/18/2024
5.0.0 83 07/18/2024
5.0.0-rc.2.20475.5 90 07/18/2024
5.0.0-rc.1.20451.14 82 07/18/2024
5.0.0-preview.8.20407.11 84 07/18/2024
5.0.0-preview.7.20364.11 71 07/18/2024
5.0.0-preview.6.20305.6 77 07/18/2024
5.0.0-preview.5.20278.1 81 07/18/2024
5.0.0-preview.4.20251.6 68 07/18/2024
5.0.0-preview.3.20215.2 75 07/18/2024
5.0.0-preview.2.20160.3 72 07/18/2024
5.0.0-preview.1.20120.4 75 07/18/2024
3.1.32 90 07/18/2024
3.1.31 85 07/18/2024
3.1.30 79 07/18/2024
3.1.29 82 07/18/2024
3.1.28 95 07/18/2024
3.1.27 80 07/18/2024
3.1.26 84 07/18/2024
3.1.25 80 07/18/2024
3.1.24 89 07/18/2024
3.1.23 83 07/18/2024
3.1.22 95 07/18/2024
3.1.21 89 07/18/2024
3.1.20 82 07/18/2024
3.1.19 81 07/18/2024
3.1.18 81 07/18/2024
3.1.17 85 07/18/2024
3.1.16 72 07/18/2024
3.1.15 79 07/18/2024
3.1.14 84 07/18/2024
3.1.13 75 07/18/2024
3.1.12 85 07/18/2024
3.1.11 83 07/18/2024
3.1.10 81 07/18/2024
3.1.9 84 07/18/2024
3.1.8 90 07/18/2024
3.1.7 86 07/18/2024
3.1.6 80 07/18/2024
3.1.5 75 07/18/2024
3.1.4 82 07/18/2024
3.1.3 87 07/18/2024
3.1.2 85 07/18/2024
3.1.1 81 07/18/2024
3.1.0 87 07/18/2024
3.1.0-preview3.19553.2 80 07/18/2024
3.1.0-preview2.19525.4 72 07/18/2024
3.1.0-preview1.19506.1 81 07/18/2024
3.0.3 81 07/18/2024
3.0.2 77 07/18/2024
3.0.1 77 07/18/2024
3.0.0 91 07/18/2024
3.0.0-rc1.19456.10 78 07/18/2024
3.0.0-preview9.19423.4 76 07/18/2024
3.0.0-preview8.19405.4 79 07/18/2024
3.0.0-preview7.19362.4 74 07/18/2024
3.0.0-preview6.19304.6 68 07/18/2024
3.0.0-preview5.19227.9 89 07/18/2024
3.0.0-preview4.19216.2 82 07/18/2024
3.0.0-preview3.19153.1 77 07/18/2024
3.0.0-preview.19074.2 76 07/18/2024
3.0.0-preview.18572.1 89 07/18/2024
2.2.4 82 07/18/2024
2.2.0 85 07/18/2024
2.2.0-preview3-35497 67 07/18/2024
2.2.0-preview2-35157 84 07/18/2024
2.2.0-preview1-35029 85 07/18/2024
2.1.1 90 07/18/2024
2.1.0 86 07/18/2024
2.1.0-rc1-final 88 07/18/2024
2.1.0-preview2-final 80 07/18/2024
2.1.0-preview1-final 70 07/18/2024
2.0.2 85 07/18/2024
2.0.1 92 07/18/2024
2.0.0 76 07/18/2024
2.0.0-preview2-final 85 07/18/2024
2.0.0-preview1-final 89 07/17/2024
1.1.2 88 07/18/2024
1.1.1 91 07/18/2024
1.1.0 77 07/18/2024
1.1.0-preview1-final 73 07/18/2024
1.0.2 81 07/18/2024
1.0.1 87 07/18/2024
1.0.0 84 07/18/2024
1.0.0-rc2-final 68 07/18/2024
1.0.0-rc1-final 72 07/18/2024