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.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
|
76 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
66 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
54 |
Microsoft.Identity.Client.Extensions.Msal
This package contains extensions to Microsoft Authentication Library for .NET (MSAL.NET)
|
52 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
51 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
48 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
This package was built from the source at:
https://github.com/aspnet/Hosting/tree/27e4e1aca3863389098b9be6dd9c5b7c030180b8
|
46 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
45 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
This package was built from the source at:
https://github.com/aspnet/Hosting/tree/687a99438a1a596a11b7dbd0bf9da5035b3b74eb
|
45 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
44 |
Microsoft.Identity.Client.Extensions.Msal
This package contains extensions to Microsoft Authentication Library for .NET (MSAL.NET)
|
44 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
43 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
42 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
41 |
Microsoft.AspNetCore.Hosting
ASP.NET Core hosting infrastructure and startup logic for web applications.
|
40 |
.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)