Microsoft.Extensions.Configuration.EnvironmentVariables 10.0.7

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 10.0.7
                    
NuGet\Install-Package Microsoft.Extensions.Configuration.EnvironmentVariables -Version 10.0.7
                    
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="10.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.7" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.Extensions.Configuration.EnvironmentVariables --version 10.0.7
                    
#r "nuget: Microsoft.Extensions.Configuration.EnvironmentVariables, 10.0.7"
                    
#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.
#:package Microsoft.Extensions.Configuration.EnvironmentVariables@10.0.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.Extensions.Configuration.EnvironmentVariables&version=10.0.7
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.Extensions.Configuration.EnvironmentVariables&version=10.0.7
                    
Install as a Cake Tool

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 was computed.  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 was computed.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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.6K)

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

Package Downloads
Microsoft.Extensions.Hosting

Hosting and startup infrastructures for applications.

Microsoft.AspNetCore.Hosting

ASP.NET Core hosting infrastructure and startup logic for web applications.

Microsoft.Azure.WebJobs

This package contains the runtime host components of the WebJobs SDK. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.

Microsoft.AspNetCore

Microsoft.AspNetCore

Microsoft.Identity.Web.TokenAcquisition

Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.0-preview.3.26207.106 8,303 4/14/2026
11.0.0-preview.2.26159.112 21,526 3/10/2026
11.0.0-preview.1.26104.118 20,294 2/10/2026
10.0.7 2,065,300 4/21/2026
10.0.6 1,459,849 4/14/2026
10.0.5 7,203,202 3/12/2026
10.0.4 744,829 3/10/2026
10.0.3 8,121,104 2/10/2026
10.0.2 9,089,059 1/13/2026
10.0.1 8,919,213 12/9/2025
10.0.0 18,162,131 11/11/2025
10.0.0-rc.2.25502.107 155,267 10/14/2025
10.0.0-rc.1.25451.107 230,580 9/9/2025
9.0.15 284,865 4/14/2026
9.0.14 742,657 3/10/2026
9.0.13 775,558 2/10/2026
9.0.12 1,365,367 1/13/2026
9.0.11 4,815,078 11/11/2025
9.0.10 9,359,026 10/14/2025
9.0.9 12,041,438 9/9/2025
Loading failed