Microsoft.Extensions.Configuration.EnvironmentVariables 11.0.0-rc.1.26425.128

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
37
Microsoft.AspNetCore
Microsoft.AspNetCore
38
Microsoft.AspNetCore
Microsoft.AspNetCore
42
Microsoft.AspNetCore
Microsoft.AspNetCore
44
Microsoft.AspNetCore
Microsoft.AspNetCore
45
Microsoft.AspNetCore
Microsoft.AspNetCore
720
Microsoft.AspNetCore.All
Microsoft.AspNetCore.All
38
Microsoft.AspNetCore.All
Microsoft.AspNetCore.All
39
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
39
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
659
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
682
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
38
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
38
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
44
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
66
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
182
Microsoft.Identity.Web.TokenAcquisition
Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).
41

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

.NET 10.0

.NET 11.0

.NET Framework 4.6.2

.NET Standard 2.0

Version Downloads Last updated
11.0.0-rc.1.26425.128 2 09/10/2026
11.0.0-preview.7.26381.103 2 08/15/2026
11.0.0-preview.6.26359.118 8 07/26/2026
11.0.0-preview.5.26302.115 7 06/15/2026
11.0.0-preview.4.26230.115 15 05/13/2026
11.0.0-preview.3.26207.106 19 04/15/2026
11.0.0-preview.2.26159.112 16 03/11/2026
11.0.0-preview.1.26104.118 5 02/12/2026
10.0.12 1 09/13/2026
10.0.11 3 08/15/2026
10.0.10 9 07/25/2026
10.0.9 8 06/13/2026
10.0.8 9 05/13/2026
10.0.7 9 05/06/2026
10.0.6 16 04/16/2026
10.0.5 12 03/14/2026
10.0.4 7 03/11/2026
10.0.3 18 02/12/2026
10.0.2 15 01/16/2026
10.0.1 16 12/12/2025
10.0.0 15 11/13/2025
10.0.0-rc.2.25502.107 14 10/20/2025
10.0.0-rc.1.25451.107 22 09/13/2025
10.0.0-preview.7.25380.108 29 08/14/2025
10.0.0-preview.6.25358.103 18 07/16/2025
10.0.0-preview.5.25277.114 23 06/07/2025
10.0.0-preview.4.25258.110 24 06/06/2025
10.0.0-preview.3.25171.5 23 04/26/2025
10.0.0-preview.2.25163.2 30 03/20/2025
10.0.0-preview.1.25080.5 30 02/25/2025
9.0.20 1 09/13/2026
9.0.19 3 08/15/2026
9.0.18 8 07/21/2026
9.0.17 9 06/15/2026
9.0.16 14 05/13/2026
9.0.15 8 04/16/2026
9.0.14 19 03/11/2026
9.0.13 16 02/12/2026
9.0.12 14 01/16/2026
9.0.11 18 11/13/2025
9.0.10 24 10/22/2025
9.0.9 21 09/13/2025
9.0.8 23 08/07/2025
9.0.7 17 07/12/2025
9.0.6 23 06/15/2025
9.0.5 24 06/28/2025
9.0.4 22 04/26/2025
9.0.3 29 03/20/2025
9.0.2 18 02/25/2025
9.0.1 21 01/18/2025
9.0.0 28 01/18/2025
9.0.0-rc.2.24473.5 26 01/18/2025
9.0.0-rc.1.24431.7 23 10/05/2024
9.0.0-preview.7.24405.7 23 06/30/2025
9.0.0-preview.6.24327.7 23 03/20/2025
9.0.0-preview.5.24306.7 23 02/27/2025
9.0.0-preview.4.24266.19 22 05/19/2025
9.0.0-preview.3.24172.9 18 03/27/2025
9.0.0-preview.2.24128.5 20 03/26/2024
9.0.0-preview.1.24080.9 35 02/15/2024
8.0.0 38 11/15/2023
8.0.0-rc.2.23479.6 22 03/14/2024
8.0.0-rc.1.23419.4 28 03/16/2024
8.0.0-preview.7.23375.6 29 03/11/2024
8.0.0-preview.6.23329.7 23 03/11/2024
8.0.0-preview.5.23280.8 17 03/14/2024
8.0.0-preview.4.23259.5 20 03/11/2024
8.0.0-preview.3.23174.8 26 03/10/2024
8.0.0-preview.2.23128.3 27 03/11/2024
8.0.0-preview.1.23110.8 26 03/11/2024
7.0.0 166 08/18/2023
7.0.0-rc.2.22472.3 33 03/08/2024
7.0.0-rc.1.22426.10 28 03/08/2024
7.0.0-preview.7.22375.6 25 03/10/2024
7.0.0-preview.6.22324.4 27 03/09/2024
7.0.0-preview.5.22301.12 27 03/02/2024
7.0.0-preview.4.22229.4 23 03/10/2024
7.0.0-preview.3.22175.4 28 03/09/2024
7.0.0-preview.2.22152.2 20 03/01/2024
7.0.0-preview.1.22076.8 29 03/08/2024
6.0.2 29 01/18/2025
6.0.2-mauipre.1.22102.15 26 03/28/2024
6.0.2-mauipre.1.22054.8 19 03/19/2024
6.0.1 40 08/18/2023
6.0.0 32 08/18/2023
6.0.0-rc.2.21480.5 19 03/18/2024
6.0.0-rc.1.21451.13 34 03/16/2024
6.0.0-preview.7.21377.19 17 03/11/2024
6.0.0-preview.6.21352.12 22 10/05/2024
6.0.0-preview.5.21301.5 23 03/11/2024
6.0.0-preview.4.21253.7 21 06/30/2025
6.0.0-preview.3.21201.4 23 03/09/2024
6.0.0-preview.2.21154.6 26 03/15/2024
6.0.0-preview.1.21102.12 22 03/09/2024
5.0.0 29 03/07/2024
5.0.0-rc.2.20475.5 25 03/22/2024
5.0.0-rc.1.20451.14 20 03/17/2024
5.0.0-preview.8.20407.11 27 03/14/2024
5.0.0-preview.7.20364.11 28 03/14/2024
5.0.0-preview.6.20305.6 18 03/11/2024
5.0.0-preview.5.20278.1 21 03/11/2024
5.0.0-preview.4.20251.6 37 03/11/2024
5.0.0-preview.3.20215.2 23 03/11/2024
5.0.0-preview.2.20160.3 23 03/11/2024
5.0.0-preview.1.20120.4 31 06/30/2025
3.1.32 26 02/26/2024
3.1.31 29 03/18/2024
3.1.30 30 03/07/2024
3.1.29 26 03/07/2024
3.1.28 24 03/18/2024
3.1.27 30 03/07/2024
3.1.26 28 03/07/2024
3.1.25 24 03/07/2024
3.1.24 28 03/07/2024
3.1.23 23 03/07/2024
3.1.22 33 03/07/2024
3.1.21 25 03/07/2024
3.1.20 33 03/17/2024
3.1.19 20 03/17/2024
3.1.18 26 03/15/2024
3.1.17 25 03/17/2024
3.1.16 27 03/07/2024
3.1.15 27 03/17/2024
3.1.14 26 03/16/2024
3.1.13 25 03/17/2024
3.1.12 26 03/25/2024
3.1.11 28 03/15/2024
3.1.10 28 03/17/2024
3.1.9 20 03/07/2024
3.1.8 25 03/07/2024
3.1.7 38 03/07/2024
3.1.6 19 03/07/2024
3.1.5 24 03/25/2024
3.1.4 35 01/29/2024
3.1.3 18 03/07/2024
3.1.2 31 03/07/2024
3.1.1 17 03/07/2024
3.1.0 24 11/15/2023
3.1.0-preview3.19553.2 27 03/11/2024
3.1.0-preview2.19525.4 18 03/14/2024
3.1.0-preview1.19506.1 30 03/09/2024
3.0.3 23 01/07/2024
3.0.2 20 03/07/2024
3.0.1 27 03/07/2024
3.0.0 24 03/07/2024
3.0.0-rc1.19456.10 24 03/15/2024
3.0.0-preview9.19423.4 27 03/02/2024
3.0.0-preview8.19405.4 21 10/05/2024
3.0.0-preview7.19362.4 22 03/10/2024
3.0.0-preview6.19304.6 22 03/11/2024
3.0.0-preview5.19227.9 19 03/02/2024
3.0.0-preview4.19216.2 24 03/01/2024
3.0.0-preview3.19153.1 25 03/11/2024
3.0.0-preview.19074.2 19 03/14/2024
3.0.0-preview.18572.1 26 03/10/2024
2.2.4 30 03/07/2024
2.2.0 771 08/18/2023
2.2.0-preview3-35497 17 03/11/2024
2.2.0-preview2-35157 15 10/05/2024
2.2.0-preview1-35029 26 03/16/2024
2.1.1 25 03/07/2024
2.1.0 21 03/06/2024
2.1.0-rc1-final 31 03/16/2024
2.1.0-preview2-final 26 03/27/2024
2.1.0-preview1-final 33 03/15/2024
2.0.2 21 03/07/2024
2.0.1 23 03/07/2024
2.0.0 22 03/06/2024
2.0.0-preview2-final 22 03/08/2024
2.0.0-preview1-final 26 03/15/2024
1.1.2 25 03/19/2024
1.1.1 636 08/18/2023
1.1.0 21 03/07/2024
1.1.0-preview1-final 26 03/15/2024
1.0.2 21 03/18/2024
1.0.1 26 03/07/2024
1.0.0 21 03/07/2024
1.0.0-rc2-final 18 03/20/2024
1.0.0-rc1-final 28 03/18/2024