Microsoft.Extensions.Configuration.EnvironmentVariables 9.0.16

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
185
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
174
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.
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/687a99438a1a596a11b7dbd0bf9da5035b3b74eb
156
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
151
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
148
Microsoft.Identity.Client.Extensions.Msal
This package contains extensions to Microsoft Authentication Library for .NET (MSAL.NET)
146
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
146
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. This package was built from the source code at https://github.com/aspnet/Hosting/tree/0724e6cde1149ee1a19bfec9c13a2c9327b71213
142
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
142
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
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
138
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
137
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
136

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