Microsoft.Extensions.Configuration.CommandLine 8.0.0-preview.1.23110.8
About
Command line configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read configuration parameters from the command line arguments of your application. You can use CommandLineConfigurationExtensions.AddCommandLine extension method on IConfigurationBuilder
to add the command line configuration provider to the configuration builder.
For more information, see the documentation: Command-line configuration provider.
Example
The following example shows how to read application configuration from the command line. You can use a command like dotnet run --InputPath "c:\fizz" --OutputPath "c:\buzz"
to run it.
using System;
using Microsoft.Extensions.Configuration;
class Program
{
static void Main(string[] args)
{
// Build a configuration object from command line
IConfiguration config = new ConfigurationBuilder()
.AddCommandLine(args)
.Build();
// Read configuration values
Console.WriteLine($"InputPath: {config["InputPath"]}");
Console.WriteLine($"OutputPath: {config["OutputPath"]}");
}
}
Showing the top 20 packages that depend on Microsoft.Extensions.Configuration.CommandLine.
Packages | Downloads |
---|---|
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
|
46 |
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
|
42 |
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
|
39 |
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
|
35 |
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
|
33 |
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
|
32 |
.NET Framework 4.6.2
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.1.23110.8)
- Microsoft.Extensions.Configuration (>= 8.0.0-preview.1.23110.8)
.NET 6.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.1.23110.8)
- Microsoft.Extensions.Configuration (>= 8.0.0-preview.1.23110.8)
.NET 7.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.1.23110.8)
- Microsoft.Extensions.Configuration (>= 8.0.0-preview.1.23110.8)
.NET 8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.1.23110.8)
- Microsoft.Extensions.Configuration (>= 8.0.0-preview.1.23110.8)
.NET Standard 2.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0-preview.1.23110.8)
- Microsoft.Extensions.Configuration (>= 8.0.0-preview.1.23110.8)