Microsoft.Extensions.Configuration.EnvironmentVariables 8.0.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Microsoft.Extensions.Configuration.EnvironmentVariables --version 8.0.0
NuGet\Install-Package Microsoft.Extensions.Configuration.EnvironmentVariables -Version 8.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.Extensions.Configuration.EnvironmentVariables --version 8.0.0
#r "nuget: Microsoft.Extensions.Configuration.EnvironmentVariables, 8.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Microsoft.Extensions.Configuration.EnvironmentVariables as a Cake Addin
#addin nuget:?package=Microsoft.Extensions.Configuration.EnvironmentVariables&version=8.0.0

// Install Microsoft.Extensions.Configuration.EnvironmentVariables as a Cake Tool
#tool nuget:?package=Microsoft.Extensions.Configuration.EnvironmentVariables&version=8.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.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1.1K)

Showing the top 5 NuGet packages that depend on Microsoft.Extensions.Configuration.EnvironmentVariables:

Package Downloads
Microsoft.Extensions.Hosting The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Hosting and startup infrastructures for applications.

Microsoft.AspNetCore.Hosting The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

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

Microsoft.Azure.WebJobs The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

This package contains the runtime assemblies for Microsoft.Azure.WebJobs.Host. It also adds rich diagnostics capabilities which makes it easier to monitor the WebJobs in the dashboard. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=320971

Microsoft.AspNetCore The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Microsoft.AspNetCore

Microsoft.Extensions.Logging.AzureAppServices The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Logger implementation to support Azure App Services 'Diagnostics logs' and 'Log stream' features. This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/d4eca39c3fc1944b2c6431bf6b22036bdb176c0d

GitHub repositories (283)

Showing the top 5 popular GitHub repositories that depend on Microsoft.Extensions.Configuration.EnvironmentVariables:

Repository Stars
dotnet/aspnetcore
ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
jellyfin/jellyfin
The Free Software Media System
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
jasontaylordev/CleanArchitecture
Clean Architecture Solution Template for ASP.NET Core
bitwarden/server
The core infrastructure backend (API, database, Docker, etc).
Version Downloads Last updated
9.0.0-preview.3.24172.9 22,202 4/11/2024
9.0.0-preview.2.24128.5 14,488 3/12/2024
9.0.0-preview.1.24080.9 43,739 2/13/2024
8.0.0 23,550,023 11/14/2023
8.0.0-rc.2.23479.6 146,535 10/10/2023
8.0.0-rc.1.23419.4 95,073 9/12/2023
8.0.0-preview.7.23375.6 61,034 8/8/2023
8.0.0-preview.6.23329.7 68,448 7/11/2023
8.0.0-preview.5.23280.8 50,196 6/13/2023
8.0.0-preview.4.23259.5 144,738 5/16/2023
8.0.0-preview.3.23174.8 62,172 4/11/2023
8.0.0-preview.2.23128.3 37,194 3/14/2023
8.0.0-preview.1.23110.8 94,701 2/21/2023
7.0.0 70,044,024 11/7/2022
7.0.0-rc.2.22472.3 133,450 10/11/2022
7.0.0-rc.1.22426.10 70,725 9/14/2022
7.0.0-preview.7.22375.6 57,914 8/9/2022
7.0.0-preview.6.22324.4 49,769 7/12/2022
7.0.0-preview.5.22301.12 43,320 6/14/2022
7.0.0-preview.4.22229.4 54,971 5/10/2022
7.0.0-preview.3.22175.4 44,558 4/13/2022
7.0.0-preview.2.22152.2 30,034 3/14/2022
7.0.0-preview.1.22076.8 25,606 2/17/2022
6.0.2-mauipre.1.22102.15 40,014 2/15/2022
6.0.2-mauipre.1.22054.8 109,134 1/19/2022
6.0.1 128,590,900 2/8/2022
6.0.0 55,651,626 11/8/2021
6.0.0-rc.2.21480.5 411,997 10/12/2021
6.0.0-rc.1.21451.13 262,033 9/14/2021
6.0.0-preview.7.21377.19 134,992 8/10/2021
6.0.0-preview.6.21352.12 47,321 7/14/2021
6.0.0-preview.5.21301.5 40,704 6/15/2021
6.0.0-preview.4.21253.7 33,762 5/24/2021
6.0.0-preview.3.21201.4 80,276 4/8/2021
6.0.0-preview.2.21154.6 67,121 3/11/2021
6.0.0-preview.1.21102.12 69,227 2/12/2021
5.0.0 102,823,219 11/9/2020
5.0.0-rc.2.20475.5 137,626 10/13/2020
5.0.0-rc.1.20451.14 258,364 9/14/2020
5.0.0-preview.8.20407.11 37,130 8/25/2020
5.0.0-preview.7.20364.11 49,120 7/21/2020
5.0.0-preview.6.20305.6 29,533 6/25/2020
5.0.0-preview.5.20278.1 19,384 6/10/2020
5.0.0-preview.4.20251.6 40,951 5/18/2020
5.0.0-preview.3.20215.2 20,346 4/23/2020
5.0.0-preview.2.20160.3 56,694 4/2/2020
5.0.0-preview.1.20120.4 25,678 3/16/2020
3.1.32 1,392,688 12/13/2022
3.1.31 501,691 11/8/2022
3.1.30 808,883 10/11/2022
3.1.29 297,980 9/13/2022
3.1.28 564,690 8/9/2022
3.1.27 341,074 7/12/2022
3.1.26 334,573 6/14/2022
3.1.25 602,233 5/10/2022
3.1.24 413,774 4/11/2022
3.1.23 1,010,533 3/8/2022
3.1.22 5,934,873 12/14/2021
3.1.21 1,750,563 11/7/2021
3.1.20 1,026,456 10/11/2021
3.1.19 1,020,222 9/14/2021
3.1.18 2,129,781 8/10/2021
3.1.17 1,644,808 7/13/2021
3.1.16 2,125,111 6/8/2021
3.1.15 2,883,723 5/11/2021
3.1.14 2,946,296 4/6/2021
3.1.13 3,035,775 3/9/2021
3.1.12 2,561,282 2/9/2021
3.1.11 3,844,899 1/12/2021
3.1.10 6,932,647 11/9/2020
3.1.9 8,893,271 10/13/2020
3.1.8 11,758,209 9/8/2020
3.1.7 7,452,935 8/11/2020
3.1.6 15,093,483 7/14/2020
3.1.5 13,393,812 6/9/2020
3.1.4 7,109,541 5/12/2020
3.1.3 14,855,351 3/24/2020
3.1.2 13,169,353 2/18/2020
3.1.1 10,076,121 1/14/2020
3.1.0 21,499,713 12/3/2019
3.1.0-preview3.19553.2 16,643 11/13/2019
3.1.0-preview2.19525.4 6,735 11/1/2019
3.1.0-preview1.19506.1 16,876 10/15/2019
3.0.3 317,558 2/18/2020
3.0.2 744,445 1/14/2020
3.0.1 1,227,661 11/18/2019
3.0.0 14,676,906 9/23/2019
3.0.0-rc1.19456.10 21,696 9/16/2019
3.0.0-preview9.19423.4 115,683 9/4/2019
3.0.0-preview8.19405.4 89,979 8/13/2019
3.0.0-preview7.19362.4 37,802 7/23/2019
3.0.0-preview6.19304.6 61,442 6/12/2019
3.0.0-preview5.19227.9 71,544 5/6/2019
3.0.0-preview4.19216.2 15,366 4/18/2019
3.0.0-preview3.19153.1 56,935 3/6/2019
3.0.0-preview.19074.2 26,893 1/29/2019
3.0.0-preview.18572.1 13,317 12/4/2018
2.2.4 61,873,959 4/9/2019
2.2.0 100,080,867 12/3/2018
2.2.0-preview3-35497 149,589 10/17/2018
2.2.0-preview2-35157 96,277 9/12/2018
2.2.0-preview1-35029 36,213 8/22/2018
2.1.1 185,612,348 6/18/2018
2.1.0 116,072,300 5/29/2018
2.1.0-rc1-final 268,178 5/6/2018
2.1.0-preview2-final 383,434 4/10/2018
2.1.0-preview1-final 294,071 2/26/2018
2.0.2 9,515,458 5/7/2018
2.0.1 7,452,112 3/13/2018
2.0.0 32,420,169 8/11/2017
2.0.0-preview2-final 122,793 6/28/2017
2.0.0-preview1-final 64,926 5/10/2017
1.1.2 8,433,257 5/9/2017
1.1.1 5,286,693 3/6/2017
1.1.0 4,364,452 11/16/2016
1.1.0-preview1-final 39,097 10/24/2016
1.0.2 76,101,819 3/6/2017
1.0.1 3,355,592 12/12/2016
1.0.0 14,924,058 6/27/2016
1.0.0-rc2-final 150,451 5/16/2016
1.0.0-rc1-final 487,666 11/18/2015