Microsoft.Extensions.Configuration.EnvironmentVariables 11.0.0-preview.5.26302.115

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.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/AspNetCore/tree/be0a4a7f4cf06cbd6ec714bd1d9afee6bdb040a8
187
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
175
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
164
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
162
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
159
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/687a99438a1a596a11b7dbd0bf9da5035b3b74eb
158
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/27e4e1aca3863389098b9be6dd9c5b7c030180b8
155
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
150
Microsoft.Identity.Client.Extensions.Msal
This package contains extensions to Microsoft Authentication Library for .NET (MSAL.NET)
149
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
149
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
148
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
145
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
145
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
144
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
141
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
140
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
139

.NET 10.0

.NET 11.0

.NET Framework 4.6.2

.NET Standard 2.0

Version Downloads Last updated
11.0.0-preview.5.26302.115 5 6/9/2026
11.0.0-preview.4.26230.115 11 5/13/2026
11.0.0-preview.3.26207.106 14 5/3/2026
11.0.0-preview.2.26159.112 17 3/12/2026
11.0.0-preview.1.26104.118 19 2/12/2026
10.0.9 5 6/10/2026
10.0.8 10 5/13/2026
10.0.7 10 5/4/2026
10.0.6 13 5/4/2026
10.0.5 16 3/14/2026
10.0.4 13 3/12/2026
10.0.3 17 2/12/2026
10.0.2 20 1/15/2026
10.0.1 25 12/11/2025
10.0.0 49 11/11/2025
10.0.0-rc.2.25502.107 60 10/15/2025
10.0.0-rc.1.25451.107 63 9/10/2025
10.0.0-preview.7.25380.108 63 8/14/2025
10.0.0-preview.6.25358.103 78 7/17/2025
10.0.0-preview.5.25277.114 76 6/8/2025
10.0.0-preview.4.25258.110 75 5/15/2025
10.0.0-preview.3.25171.5 95 4/15/2025
10.0.0-preview.2.25163.2 74 3/18/2025
10.0.0-preview.1.25080.5 89 2/26/2025
9.0.17 3 6/10/2026
9.0.16 10 5/13/2026
9.0.15 12 5/3/2026
9.0.14 14 3/12/2026
9.0.13 13 2/12/2026
9.0.12 19 1/16/2026
9.0.11 50 11/11/2025
9.0.10 55 10/15/2025
9.0.9 68 9/10/2025
9.0.8 60 8/5/2025
9.0.7 77 7/12/2025
9.0.6 64 6/12/2025
9.0.5 68 5/16/2025
9.0.4 91 4/9/2025
9.0.3 95 3/17/2025
9.0.2 76 2/15/2025
9.0.1 89 1/18/2025
9.0.0 80 11/18/2024
9.0.0-rc.2.24473.5 102 10/19/2024
9.0.0-rc.1.24431.7 95 9/12/2024
9.0.0-preview.7.24405.7 95 8/14/2024
9.0.0-preview.6.24327.7 102 7/10/2024
9.0.0-preview.5.24306.7 96 6/20/2024
9.0.0-preview.4.24266.19 101 5/26/2024
9.0.0-preview.3.24172.9 88 4/29/2024
9.0.0-preview.2.24128.5 95 3/18/2024
9.0.0-preview.1.24080.9 109 2/23/2024
8.0.0 109 11/17/2023
8.0.0-rc.2.23479.6 102 10/13/2023
8.0.0-rc.1.23419.4 118 9/15/2023
8.0.0-preview.7.23375.6 108 8/22/2023
8.0.0-preview.6.23329.7 102 8/3/2023
8.0.0-preview.5.23280.8 101 7/30/2023
8.0.0-preview.4.23259.5 100 8/3/2023
8.0.0-preview.3.23174.8 114 5/17/2023
8.0.0-preview.2.23128.3 98 5/17/2023
8.0.0-preview.1.23110.8 99 2/24/2023
7.0.0 110 11/17/2022
7.0.0-rc.2.22472.3 120 11/29/2022
7.0.0-rc.1.22426.10 108 9/16/2022
7.0.0-preview.7.22375.6 109 9/16/2022
7.0.0-preview.6.22324.4 111 7/31/2022
7.0.0-preview.5.22301.12 117 6/29/2022
7.0.0-preview.4.22229.4 108 6/30/2022
7.0.0-preview.3.22175.4 112 6/30/2022
7.0.0-preview.2.22152.2 121 6/30/2022
7.0.0-preview.1.22076.8 119 6/30/2022
6.0.2 98 11/17/2024
6.0.2-mauipre.1.22102.15 121 6/30/2022
6.0.2-mauipre.1.22054.8 117 6/30/2022
6.0.1 104 6/30/2022
6.0.0 115 6/30/2022
6.0.0-rc.2.21480.5 118 6/30/2022
6.0.0-rc.1.21451.13 98 6/30/2022
6.0.0-preview.7.21377.19 125 6/30/2022
6.0.0-preview.6.21352.12 101 6/30/2022
6.0.0-preview.5.21301.5 101 6/30/2022
6.0.0-preview.4.21253.7 113 6/30/2022
6.0.0-preview.3.21201.4 108 6/30/2022
6.0.0-preview.2.21154.6 109 6/30/2022
6.0.0-preview.1.21102.12 105 6/30/2022
5.0.0 112 6/30/2022
5.0.0-rc.2.20475.5 112 6/30/2022
5.0.0-rc.1.20451.14 101 6/30/2022
5.0.0-preview.8.20407.11 97 6/30/2022
5.0.0-preview.7.20364.11 110 6/30/2022
5.0.0-preview.6.20305.6 105 6/30/2022
5.0.0-preview.5.20278.1 99 6/30/2022
5.0.0-preview.4.20251.6 113 6/30/2022
5.0.0-preview.3.20215.2 112 6/30/2022
5.0.0-preview.2.20160.3 106 6/30/2022
5.0.0-preview.1.20120.4 109 6/30/2022
3.1.32 107 1/21/2023
3.1.31 108 12/5/2022
3.1.30 108 11/28/2022
3.1.29 119 9/16/2022
3.1.28 121 9/16/2022
3.1.27 117 9/16/2022
3.1.26 117 6/30/2022
3.1.25 108 6/30/2022
3.1.24 122 6/30/2022
3.1.23 112 6/30/2022
3.1.22 112 6/30/2022
3.1.21 110 6/30/2022
3.1.20 103 6/30/2022
3.1.19 106 6/30/2022
3.1.18 116 6/30/2022
3.1.17 108 6/30/2022
3.1.16 121 6/30/2022
3.1.15 110 6/29/2022
3.1.14 113 6/29/2022
3.1.13 116 6/29/2022
3.1.12 113 6/29/2022
3.1.11 117 6/29/2022
3.1.10 118 6/29/2022
3.1.9 109 6/30/2022
3.1.8 122 6/30/2022
3.1.7 103 6/30/2022
3.1.6 117 6/30/2022
3.1.5 109 6/30/2022
3.1.4 109 6/30/2022
3.1.3 108 6/30/2022
3.1.2 112 6/30/2022
3.1.1 111 6/29/2022
3.1.0 109 6/29/2022
3.1.0-preview3.19553.2 110 6/29/2022
3.1.0-preview2.19525.4 100 6/29/2022
3.1.0-preview1.19506.1 111 6/29/2022
3.0.3 122 6/29/2022
3.0.2 105 6/29/2022
3.0.1 119 6/29/2022
3.0.0 117 6/29/2022
3.0.0-rc1.19456.10 118 6/29/2022
3.0.0-preview9.19423.4 106 6/29/2022
3.0.0-preview8.19405.4 112 6/29/2022
3.0.0-preview7.19362.4 110 6/29/2022
3.0.0-preview6.19304.6 109 6/29/2022
3.0.0-preview5.19227.9 97 6/29/2022
3.0.0-preview4.19216.2 109 6/29/2022
3.0.0-preview3.19153.1 109 6/29/2022
3.0.0-preview.19074.2 112 6/29/2022
3.0.0-preview.18572.1 104 6/29/2022
2.2.4 109 6/29/2022
2.2.0 112 6/29/2022
2.2.0-preview3-35497 110 6/29/2022
2.2.0-preview2-35157 110 6/29/2022
2.2.0-preview1-35029 115 6/29/2022
2.1.1 113 6/29/2022
2.1.0 118 6/29/2022
2.1.0-rc1-final 118 6/29/2022
2.1.0-preview2-final 107 6/29/2022
2.1.0-preview1-final 117 6/29/2022
2.0.2 112 6/29/2022
2.0.1 105 6/29/2022
2.0.0 122 6/29/2022
2.0.0-preview2-final 110 6/29/2022
2.0.0-preview1-final 109 6/29/2022
1.1.2 113 6/29/2022
1.1.1 105 6/29/2022
1.1.0 105 6/29/2022
1.1.0-preview1-final 104 6/29/2022
1.0.2 119 6/29/2022
1.0.1 126 6/29/2022
1.0.0 104 6/29/2022
1.0.0-rc2-final 119 6/29/2022
1.0.0-rc1-final 107 6/29/2022