Microsoft.Extensions.Configuration.CommandLine 8.0.0-preview.2.23128.3

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

.NET 6.0

.NET 7.0

.NET 8.0

.NET Standard 2.0

Version Downloads Last updated
9.0.0-rc.2.24473.5 6 10/15/2024
9.0.0-rc.1.24431.7 9 9/11/2024
9.0.0-preview.7.24405.7 13 8/15/2024
9.0.0-preview.6.24327.7 16 7/10/2024
9.0.0-preview.5.24306.7 13 6/14/2024
9.0.0-preview.4.24266.19 15 5/24/2024
9.0.0-preview.3.24172.9 16 4/16/2024
9.0.0-preview.2.24128.5 17 3/29/2024
9.0.0-preview.1.24080.9 23 2/19/2024
8.0.0 27 11/16/2023
8.0.0-rc.2.23479.6 24 10/24/2023
8.0.0-rc.1.23419.4 24 9/17/2023
8.0.0-preview.7.23375.6 34 8/23/2023
8.0.0-preview.6.23329.7 34 7/22/2023
8.0.0-preview.5.23280.8 32 8/3/2023
8.0.0-preview.4.23259.5 36 8/3/2023
8.0.0-preview.3.23174.8 31 5/14/2023
8.0.0-preview.2.23128.3 36 5/17/2023
8.0.0-preview.1.23110.8 27 2/24/2023
7.0.0 33 12/5/2022
7.0.0-rc.2.22472.3 29 12/5/2022
7.0.0-rc.1.22426.10 38 9/16/2022
7.0.0-preview.7.22375.6 34 8/16/2022
7.0.0-preview.6.22324.4 36 9/16/2022
7.0.0-preview.5.22301.12 35 6/29/2022
7.0.0-preview.4.22229.4 38 6/29/2022
7.0.0-preview.3.22175.4 28 6/29/2022
7.0.0-preview.2.22152.2 39 6/29/2022
7.0.0-preview.1.22076.8 37 6/29/2022
6.0.2-mauipre.1.22102.15 41 6/29/2022
6.0.2-mauipre.1.22054.8 40 6/29/2022
6.0.0 40 6/29/2022
6.0.0-rc.2.21480.5 33 6/29/2022
6.0.0-rc.1.21451.13 31 6/29/2022
6.0.0-preview.7.21377.19 34 8/29/2022
6.0.0-preview.6.21352.12 34 10/6/2022
6.0.0-preview.5.21301.5 36 10/10/2022
6.0.0-preview.4.21253.7 31 9/26/2022
6.0.0-preview.3.21201.4 31 10/23/2022
6.0.0-preview.2.21154.6 33 9/13/2022
6.0.0-preview.1.21102.12 30 2/14/2023
5.0.0 34 2/22/2023
5.0.0-rc.2.20475.5 34 12/19/2022
5.0.0-rc.1.20451.14 31 7/31/2022
5.0.0-preview.8.20407.11 36 1/27/2023
5.0.0-preview.7.20364.11 34 9/2/2022
5.0.0-preview.6.20305.6 33 9/22/2022
5.0.0-preview.5.20278.1 29 2/5/2023
5.0.0-preview.4.20251.6 37 10/9/2022
5.0.0-preview.3.20215.2 34 2/24/2023
5.0.0-preview.2.20160.3 27 10/17/2022
5.0.0-preview.1.20120.4 42 10/17/2022
3.1.32 35 1/27/2023
3.1.31 37 11/23/2022
3.1.30 38 10/23/2022
3.1.29 30 9/16/2022
3.1.28 33 9/16/2022
3.1.27 38 9/16/2022
3.1.26 27 2/24/2023
3.1.25 41 9/26/2022
3.1.24 32 1/4/2023
3.1.23 33 2/24/2023
3.1.22 31 7/26/2022
3.1.21 35 6/29/2022
3.1.20 44 6/29/2022
3.1.19 40 6/29/2022
3.1.18 32 6/29/2022
3.1.17 33 6/29/2022
3.1.16 29 6/29/2022
3.1.15 38 6/29/2022
3.1.14 29 6/29/2022
3.1.13 31 6/29/2022
3.1.12 36 6/29/2022
3.1.11 37 6/29/2022
3.1.10 32 6/29/2022
3.1.9 33 10/16/2022
3.1.8 33 9/2/2022
3.1.7 36 8/31/2022
3.1.6 35 8/12/2022
3.1.5 39 10/18/2022
3.1.4 30 2/24/2023
3.1.3 32 11/29/2022
3.1.2 33 6/29/2022
3.1.1 39 6/29/2022
3.1.0 34 6/29/2022
3.1.0-preview3.19553.2 33 6/29/2022
3.1.0-preview2.19525.4 32 6/29/2022
3.1.0-preview1.19506.1 41 6/29/2022
3.0.3 44 6/29/2022
3.0.2 32 6/29/2022
3.0.1 35 6/29/2022
3.0.0 35 6/29/2022
3.0.0-rc1.19456.10 43 6/29/2022
3.0.0-preview9.19423.4 32 6/29/2022
3.0.0-preview8.19405.4 33 6/29/2022
3.0.0-preview7.19362.4 35 6/29/2022
3.0.0-preview6.19304.6 34 6/29/2022
3.0.0-preview5.19227.9 33 6/29/2022
3.0.0-preview4.19216.2 33 6/29/2022
3.0.0-preview3.19153.1 29 6/29/2022
3.0.0-preview.19074.2 40 6/29/2022
3.0.0-preview.18572.1 36 6/29/2022
2.2.0 35 6/29/2022
2.2.0-preview3-35497 33 6/29/2022
2.2.0-preview2-35157 46 6/29/2022
2.2.0-preview1-35029 34 6/29/2022
2.1.1 31 6/29/2022
2.1.0 44 6/29/2022
2.1.0-rc1-final 50 6/29/2022
2.1.0-preview2-final 39 6/29/2022
2.1.0-preview1-final 33 6/29/2022
2.0.2 33 6/29/2022
2.0.1 36 6/29/2022
2.0.0 39 6/29/2022
2.0.0-preview2-final 34 6/29/2022
2.0.0-preview1-final 37 6/29/2022
1.1.2 44 6/29/2022
1.1.1 41 6/29/2022
1.1.0 36 6/29/2022
1.1.0-preview1-final 30 6/29/2022
1.0.2 43 6/29/2022
1.0.1 40 6/29/2022
1.0.0 41 6/29/2022
1.0.0-rc2-final 34 6/29/2022
1.0.0-rc1-final 35 6/29/2022