Microsoft.Extensions.Configuration.EnvironmentVariables 8.0.0-preview.4.23259.5
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.
For more information, see the documentation: Environment variable configuration provider.
Example
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"]}");
}
}
Showing the top 20 packages that depend on Microsoft.Extensions.Configuration.EnvironmentVariables.
Packages | Downloads |
---|---|
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
10 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
9 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
8 |
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
|
8 |
OpenTelemetry
OpenTelemetry .NET SDK
|
7 |
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
|
7 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
7 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
6 |
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
|
6 |
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
|
5 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
4 |
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
|
4 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
4 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.4.23259.5)
- Microsoft.Extensions.Configuration (>= 8.0.0-preview.4.23259.5)
.NET 6.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.4.23259.5)
- Microsoft.Extensions.Configuration (>= 8.0.0-preview.4.23259.5)
.NET 7.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.4.23259.5)
- Microsoft.Extensions.Configuration (>= 8.0.0-preview.4.23259.5)
.NET 8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.4.23259.5)
- Microsoft.Extensions.Configuration (>= 8.0.0-preview.4.23259.5)
.NET Standard 2.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.4.23259.5)
- Microsoft.Extensions.Configuration (>= 8.0.0-preview.4.23259.5)