Microsoft.Extensions.Configuration.EnvironmentVariables 11.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.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
203
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
194
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
177
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. This package was built from the source at: https://github.com/aspnet/Hosting/tree/27e4e1aca3863389098b9be6dd9c5b7c030180b8
171
Microsoft.Identity.Client.Extensions.Msal
This package contains extensions to Microsoft Authentication Library for .NET (MSAL.NET)
171
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
169
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
167
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
165
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
163
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
161
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
160
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
158
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
157
Microsoft.Identity.Client.Extensions.Msal
This package contains extensions to Microsoft Authentication Library for .NET (MSAL.NET)
157
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
155

Version Downloads Last updated
11.0.0 5 11/11/2026
11.0.0-rc.3.26522.148 7 10/27/2026
11.0.0-rc.2.26504.105 11 10/14/2026
11.0.0-rc.1.26425.128 16 9/9/2026
11.0.0-preview.7.26381.103 21 8/13/2026
11.0.0-preview.6.26359.118 27 7/17/2026
11.0.0-preview.5.26302.115 30 6/9/2026
11.0.0-preview.4.26230.115 39 5/13/2026
11.0.0-preview.3.26207.106 36 5/3/2026
11.0.0-preview.2.26159.112 39 3/12/2026
11.0.0-preview.1.26104.118 43 2/12/2026
10.0.15 3 11/11/2026
10.0.14 8 10/27/2026
10.0.13 9 10/14/2026
10.0.12 16 9/9/2026
10.0.11 20 8/13/2026
10.0.10 21 7/16/2026
10.0.9 33 6/10/2026
10.0.8 38 5/13/2026
10.0.7 35 5/4/2026
10.0.6 39 5/4/2026
10.0.5 40 3/14/2026
10.0.4 35 3/12/2026
10.0.3 39 2/12/2026
10.0.2 41 1/15/2026
10.0.1 46 12/11/2025
10.0.0 65 11/11/2025
10.0.0-rc.2.25502.107 78 10/15/2025
10.0.0-rc.1.25451.107 77 9/10/2025
10.0.0-preview.7.25380.108 75 8/14/2025
10.0.0-preview.6.25358.103 100 7/17/2025
10.0.0-preview.5.25277.114 93 6/8/2025
10.0.0-preview.4.25258.110 94 5/15/2025
10.0.0-preview.3.25171.5 110 4/15/2025
10.0.0-preview.2.25163.2 88 3/18/2025
10.0.0-preview.1.25080.5 106 2/26/2025
9.0.23 4 11/11/2026
9.0.22 9 10/27/2026
9.0.21 11 10/14/2026
9.0.20 16 9/10/2026
9.0.19 22 8/13/2026
9.0.18 29 7/18/2026
9.0.17 33 6/10/2026
9.0.16 33 5/13/2026
9.0.15 34 5/3/2026
9.0.14 40 3/12/2026
9.0.13 31 2/12/2026
9.0.12 39 1/16/2026
9.0.11 66 11/11/2025
9.0.10 75 10/15/2025
9.0.9 83 9/10/2025
9.0.8 80 8/5/2025
9.0.7 98 7/12/2025
9.0.6 87 6/12/2025
9.0.5 84 5/16/2025
9.0.4 107 4/9/2025
9.0.3 117 3/17/2025
9.0.2 91 2/15/2025
9.0.1 106 1/18/2025
9.0.0 97 11/18/2024
9.0.0-rc.2.24473.5 120 10/19/2024
9.0.0-rc.1.24431.7 109 9/12/2024
9.0.0-preview.7.24405.7 111 8/14/2024
9.0.0-preview.6.24327.7 119 7/10/2024
9.0.0-preview.5.24306.7 115 6/20/2024
9.0.0-preview.4.24266.19 121 5/26/2024
9.0.0-preview.3.24172.9 102 4/29/2024
9.0.0-preview.2.24128.5 112 3/18/2024
9.0.0-preview.1.24080.9 128 2/23/2024
8.0.0 119 11/17/2023
8.0.0-rc.2.23479.6 118 10/13/2023
8.0.0-rc.1.23419.4 134 9/15/2023
8.0.0-preview.7.23375.6 119 8/22/2023
8.0.0-preview.6.23329.7 114 8/3/2023
8.0.0-preview.5.23280.8 116 7/30/2023
8.0.0-preview.4.23259.5 116 8/3/2023
8.0.0-preview.3.23174.8 126 5/17/2023
8.0.0-preview.2.23128.3 114 5/17/2023
8.0.0-preview.1.23110.8 116 2/24/2023
7.0.0 127 11/17/2022
7.0.0-rc.2.22472.3 133 11/29/2022
7.0.0-rc.1.22426.10 125 9/16/2022
7.0.0-preview.7.22375.6 124 9/16/2022
7.0.0-preview.6.22324.4 127 7/31/2022
7.0.0-preview.5.22301.12 133 6/29/2022
7.0.0-preview.4.22229.4 125 6/30/2022
7.0.0-preview.3.22175.4 127 6/30/2022
7.0.0-preview.2.22152.2 137 6/30/2022
7.0.0-preview.1.22076.8 139 6/30/2022
6.0.2 118 11/17/2024
6.0.2-mauipre.1.22102.15 137 6/30/2022
6.0.2-mauipre.1.22054.8 136 6/30/2022
6.0.1 119 6/30/2022
6.0.0 131 6/30/2022
6.0.0-rc.2.21480.5 133 6/30/2022
6.0.0-rc.1.21451.13 113 6/30/2022
6.0.0-preview.7.21377.19 143 6/30/2022
6.0.0-preview.6.21352.12 118 6/30/2022
6.0.0-preview.5.21301.5 120 6/30/2022
6.0.0-preview.4.21253.7 128 6/30/2022
6.0.0-preview.3.21201.4 121 6/30/2022
6.0.0-preview.2.21154.6 127 6/30/2022
6.0.0-preview.1.21102.12 122 6/30/2022
5.0.0 128 6/30/2022
5.0.0-rc.2.20475.5 128 6/30/2022
5.0.0-rc.1.20451.14 117 6/30/2022
5.0.0-preview.8.20407.11 111 6/30/2022
5.0.0-preview.7.20364.11 126 6/30/2022
5.0.0-preview.6.20305.6 120 6/30/2022
5.0.0-preview.5.20278.1 115 6/30/2022
5.0.0-preview.4.20251.6 132 6/30/2022
5.0.0-preview.3.20215.2 132 6/30/2022
5.0.0-preview.2.20160.3 120 6/30/2022
5.0.0-preview.1.20120.4 128 6/30/2022
3.1.32 122 1/21/2023
3.1.31 126 12/5/2022
3.1.30 121 11/28/2022
3.1.29 132 9/16/2022
3.1.28 134 9/16/2022
3.1.27 129 9/16/2022
3.1.26 134 6/30/2022
3.1.25 121 6/30/2022
3.1.24 138 6/30/2022
3.1.23 127 6/30/2022
3.1.22 129 6/30/2022
3.1.21 128 6/30/2022
3.1.20 120 6/30/2022
3.1.19 122 6/30/2022
3.1.18 132 6/30/2022
3.1.17 123 6/30/2022
3.1.16 137 6/30/2022
3.1.15 122 6/29/2022
3.1.14 132 6/29/2022
3.1.13 133 6/29/2022
3.1.12 128 6/29/2022
3.1.11 134 6/29/2022
3.1.10 134 6/29/2022
3.1.9 126 6/30/2022
3.1.8 138 6/30/2022
3.1.7 124 6/30/2022
3.1.6 132 6/30/2022
3.1.5 124 6/30/2022
3.1.4 123 6/30/2022
3.1.3 129 6/30/2022
3.1.2 130 6/30/2022
3.1.1 124 6/29/2022
3.1.0 128 6/29/2022
3.1.0-preview3.19553.2 127 6/29/2022
3.1.0-preview2.19525.4 117 6/29/2022
3.1.0-preview1.19506.1 134 6/29/2022
3.0.3 140 6/29/2022
3.0.2 121 6/29/2022
3.0.1 136 6/29/2022
3.0.0 135 6/29/2022
3.0.0-rc1.19456.10 132 6/29/2022
3.0.0-preview9.19423.4 125 6/29/2022
3.0.0-preview8.19405.4 128 6/29/2022
3.0.0-preview7.19362.4 125 6/29/2022
3.0.0-preview6.19304.6 121 6/29/2022
3.0.0-preview5.19227.9 107 6/29/2022
3.0.0-preview4.19216.2 126 6/29/2022
3.0.0-preview3.19153.1 122 6/29/2022
3.0.0-preview.19074.2 128 6/29/2022
3.0.0-preview.18572.1 120 6/29/2022
2.2.4 130 6/29/2022
2.2.0 126 6/29/2022
2.2.0-preview3-35497 125 6/29/2022
2.2.0-preview2-35157 132 6/29/2022
2.2.0-preview1-35029 137 6/29/2022
2.1.1 127 6/29/2022
2.1.0 132 6/29/2022
2.1.0-rc1-final 138 6/29/2022
2.1.0-preview2-final 128 6/29/2022
2.1.0-preview1-final 132 6/29/2022
2.0.2 125 6/29/2022
2.0.1 119 6/29/2022
2.0.0 140 6/29/2022
2.0.0-preview2-final 131 6/29/2022
2.0.0-preview1-final 124 6/29/2022
1.1.2 133 6/29/2022
1.1.1 117 6/29/2022
1.1.0 124 6/29/2022
1.1.0-preview1-final 126 6/29/2022
1.0.2 136 6/29/2022
1.0.1 141 6/29/2022
1.0.0 124 6/29/2022
1.0.0-rc2-final 139 6/29/2022
1.0.0-rc1-final 122 6/29/2022