Microsoft.Extensions.Configuration.EnvironmentVariables 9.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.
Showing the top 20 packages that depend on Microsoft.Extensions.Configuration.EnvironmentVariables.
Packages | Downloads |
---|---|
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
935 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
419 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
208 |
Microsoft.Identity.Web.TokenAcquisition
Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).
|
60 |
Microsoft.Identity.Web.TokenAcquisition
Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).
|
58 |
Microsoft.Identity.Web.TokenAcquisition
Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).
|
49 |
Microsoft.Identity.Web.TokenAcquisition
Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).
|
47 |
Microsoft.Identity.Web.TokenAcquisition
Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).
|
41 |
Microsoft.Identity.Web.TokenAcquisition
Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).
|
34 |
Microsoft.Identity.Web.TokenAcquisition
Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).
|
22 |
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
|
15 |
Microsoft.Identity.Web.TokenAcquisition
Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).
|
15 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
13 |
Microsoft.Identity.Web.TokenAcquisition
Implementation for higher level API for confidential client applications (ASP.NET Core and SDK/.NET).
|
12 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
12 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)
.NET 8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)
.NET 9.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)
.NET Standard 2.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration (>= 9.0.0)