Microsoft.Extensions.Configuration.EnvironmentVariables 9.0.2
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.AspNetCore.AzureAppServices.HostingStartup
ASP.NET Core lightup integration with Azure AppServices.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/d47e49e9c1e173ac90821f7e89cc38e710274241
|
19 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
16 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
17 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
18 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
30 |
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
|
35 |
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/Hosting/tree/0724e6cde1149ee1a19bfec9c13a2c9327b71213
|
22 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
17 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
20 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
23 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
155 |
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
|
22 |
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
|
5,336 |
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
|
8,827 |
Microsoft.Extensions.Logging.AzureAppServices
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/1d696053fcd6735aaac1902afdb0b92edbf43e71
|
16 |
Microsoft.Extensions.Logging.AzureAppServices
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/36be7ed6d6d56b7da0a2891e3de7ecc2aa48eecd
|
17 |
Microsoft.Extensions.Logging.AzureAppServices
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/7c810658463f35c39c54d5fb8a8dbbfd463bf747
|
19 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.2)
- Microsoft.Extensions.Configuration (>= 9.0.2)
.NET 8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.2)
- Microsoft.Extensions.Configuration (>= 9.0.2)
.NET 9.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.2)
- Microsoft.Extensions.Configuration (>= 9.0.2)
.NET Standard 2.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.2)
- Microsoft.Extensions.Configuration (>= 9.0.2)