Microsoft.Extensions.Configuration.EnvironmentVariables 10.0.10

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.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
67
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
66
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
66
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
65
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
65
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications. When using NuGet 3.x this package requires at least version 3.4.
65
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
64
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
64
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications. When using NuGet 3.x this package requires at least version 3.4.
64

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

Version Downloads Last updated
11.0.0-preview.7.26381.103 8 08/11/2026
11.0.0-preview.6.26359.118 10 07/16/2026
11.0.0-preview.5.26302.115 19 06/11/2026
11.0.0-preview.4.26230.115 24 05/14/2026
11.0.0-preview.3.26207.106 35 04/16/2026
11.0.0-preview.2.26159.112 44 03/12/2026
11.0.0-preview.1.26104.118 50 02/16/2026
10.0.11 8 08/11/2026
10.0.10 13 07/16/2026
10.0.9 20 06/11/2026
10.0.8 22 05/14/2026
10.0.7 27 04/23/2026
10.0.6 28 04/16/2026
10.0.5 35 03/13/2026
10.0.4 36 03/12/2026
10.0.3 34 02/15/2026
10.0.2 42 01/18/2026
10.0.1 52 12/10/2025
10.0.0 52 11/15/2025
10.0.0-rc.2.25502.107 72 10/18/2025
10.0.0-rc.1.25451.107 75 09/20/2025
10.0.0-preview.7.25380.108 78 09/05/2025
10.0.0-preview.6.25358.103 81 09/05/2025
10.0.0-preview.5.25277.114 78 09/05/2025
10.0.0-preview.4.25258.110 78 09/05/2025
10.0.0-preview.3.25171.5 78 09/05/2025
10.0.0-preview.2.25163.2 82 09/05/2025
10.0.0-preview.1.25080.5 81 09/05/2025
9.0.19 8 08/11/2026
9.0.18 11 07/16/2026
9.0.17 18 06/11/2026
9.0.16 25 05/14/2026
9.0.15 27 04/16/2026
9.0.14 35 03/12/2026
9.0.13 37 02/15/2026
9.0.12 45 01/19/2026
9.0.11 51 11/16/2025
9.0.10 58 10/19/2025
9.0.9 57 09/21/2025
9.0.8 63 09/05/2025
9.0.7 66 09/05/2025
9.0.6 64 09/05/2025
9.0.5 68 09/05/2025
9.0.4 62 09/05/2025
9.0.3 66 09/05/2025
9.0.2 67 09/05/2025
9.0.1 64 09/05/2025
9.0.0 63 09/05/2025
9.0.0-rc.2.24473.5 82 09/05/2025
9.0.0-rc.1.24431.7 85 09/05/2025
9.0.0-preview.7.24405.7 82 09/05/2025
9.0.0-preview.6.24327.7 83 09/05/2025
9.0.0-preview.5.24306.7 83 09/05/2025
9.0.0-preview.4.24266.19 85 09/05/2025
9.0.0-preview.3.24172.9 78 09/05/2025
9.0.0-preview.2.24128.5 78 09/05/2025
9.0.0-preview.1.24080.9 78 09/05/2025
8.0.0 63 09/05/2025
8.0.0-rc.2.23479.6 80 09/05/2025
8.0.0-rc.1.23419.4 79 09/05/2025
8.0.0-preview.7.23375.6 81 09/05/2025
8.0.0-preview.6.23329.7 80 09/05/2025
8.0.0-preview.5.23280.8 79 09/05/2025
8.0.0-preview.4.23259.5 81 09/05/2025
8.0.0-preview.3.23174.8 80 09/05/2025
8.0.0-preview.2.23128.3 82 09/05/2025
8.0.0-preview.1.23110.8 81 09/05/2025
7.0.0 63 09/05/2025
7.0.0-rc.2.22472.3 79 09/05/2025
7.0.0-rc.1.22426.10 79 09/05/2025
7.0.0-preview.7.22375.6 76 09/05/2025
7.0.0-preview.6.22324.4 80 09/05/2025
7.0.0-preview.5.22301.12 81 09/05/2025
7.0.0-preview.4.22229.4 79 09/05/2025
7.0.0-preview.3.22175.4 80 09/05/2025
7.0.0-preview.2.22152.2 82 09/05/2025
7.0.0-preview.1.22076.8 79 09/05/2025
6.0.2 61 09/05/2025
6.0.1 60 09/05/2025
6.0.0 61 09/05/2025
6.0.0-rc.2.21480.5 79 09/05/2025
6.0.0-rc.1.21451.13 78 09/05/2025
6.0.0-preview.7.21377.19 84 09/05/2025
6.0.0-preview.6.21352.12 84 09/05/2025
6.0.0-preview.5.21301.5 76 09/05/2025
6.0.0-preview.4.21253.7 80 09/05/2025
6.0.0-preview.3.21201.4 79 09/05/2025
6.0.0-preview.2.21154.6 80 09/05/2025
6.0.0-preview.1.21102.12 83 09/05/2025
5.0.0 67 09/05/2025
5.0.0-rc.2.20475.5 75 09/05/2025
5.0.0-rc.1.20451.14 81 09/05/2025
5.0.0-preview.8.20407.11 82 09/05/2025
5.0.0-preview.7.20364.11 80 09/05/2025
5.0.0-preview.6.20305.6 77 09/05/2025
5.0.0-preview.5.20278.1 81 09/05/2025
5.0.0-preview.4.20251.6 79 09/05/2025
5.0.0-preview.3.20215.2 77 09/05/2025
5.0.0-preview.2.20160.3 78 09/05/2025
5.0.0-preview.1.20120.4 79 09/05/2025
3.1.32 58 09/05/2025
3.1.31 66 09/05/2025
3.1.30 62 09/05/2025
3.1.29 63 09/05/2025
3.1.28 56 09/05/2025
3.1.27 64 09/05/2025
3.1.26 61 09/05/2025
3.1.25 61 09/05/2025
3.1.24 68 09/05/2025
3.1.23 63 09/05/2025
3.1.22 56 09/05/2025
3.1.21 64 09/05/2025
3.1.20 63 09/05/2025
3.1.19 65 09/05/2025
3.1.18 67 09/05/2025
3.1.17 64 09/05/2025
3.1.16 63 09/05/2025
3.1.15 65 09/05/2025
3.1.14 63 09/05/2025
3.1.13 60 09/05/2025
3.1.12 61 09/05/2025
3.1.11 60 09/05/2025
3.1.10 59 09/05/2025
3.1.9 59 09/05/2025
3.1.8 57 09/05/2025
3.1.7 59 09/05/2025
3.1.6 62 09/05/2025
3.1.5 63 09/05/2025
3.1.4 62 09/05/2025
3.1.3 58 09/05/2025
3.1.2 59 09/05/2025
3.1.1 65 09/05/2025
3.1.0 63 09/05/2025
3.1.0-preview3.19553.2 79 09/05/2025
3.1.0-preview2.19525.4 79 09/05/2025
3.1.0-preview1.19506.1 76 09/05/2025
3.0.3 62 09/05/2025
3.0.2 62 09/05/2025
3.0.1 62 09/05/2025
3.0.0 60 09/05/2025
3.0.0-rc1.19456.10 74 09/05/2025
3.0.0-preview9.19423.4 80 09/05/2025
3.0.0-preview8.19405.4 76 09/05/2025
3.0.0-preview7.19362.4 78 09/05/2025
3.0.0-preview6.19304.6 75 09/05/2025
3.0.0-preview5.19227.9 72 09/05/2025
3.0.0-preview4.19216.2 76 09/05/2025
3.0.0-preview3.19153.1 75 09/05/2025
3.0.0-preview.19074.2 73 09/05/2025
3.0.0-preview.18572.1 70 09/05/2025
2.2.4 64 09/05/2025
2.2.0 62 09/05/2025
2.2.0-preview3-35497 68 09/05/2025
2.2.0-preview2-35157 71 09/05/2025
2.2.0-preview1-35029 77 09/05/2025
2.1.1 65 09/05/2025
2.1.0 59 09/05/2025
2.1.0-rc1-final 61 09/05/2025
2.1.0-preview2-final 67 09/05/2025
2.1.0-preview1-final 70 09/05/2025
2.0.2 58 09/05/2025
2.0.1 66 09/05/2025
2.0.0 64 09/05/2025
2.0.0-preview2-final 68 09/05/2025
2.0.0-preview1-final 68 09/05/2025
1.1.2 63 09/05/2025
1.1.1 62 09/05/2025
1.1.0 59 09/05/2025
1.1.0-preview1-final 71 09/05/2025
1.0.2 63 09/05/2025
1.0.1 66 09/05/2025
1.0.0 64 09/05/2025
1.0.0-rc2-final 62 09/05/2025
1.0.0-rc1-final 67 09/05/2025