Microsoft.Extensions.Configuration.CommandLine 10.0.10

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.

How to Use

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"]}");
    }
}

Additional Documentation

Feedback & Contributing

Microsoft.Extensions.Configuration.CommandLine 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.CommandLine.

Packages Downloads
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
67
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
66
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
66
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
65
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
65
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications. When using NuGet 3.x this package requires at least version 3.4.
65
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
64
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
64
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications. When using NuGet 3.x this package requires at least version 3.4.
64

https://go.microsoft.com/fwlink/?LinkID=799421

Version Downloads Last updated
11.0.0-preview.7.26381.103 9 08/11/2026
11.0.0-preview.6.26359.118 11 07/16/2026
11.0.0-preview.5.26302.115 18 06/11/2026
11.0.0-preview.4.26230.115 26 05/14/2026
11.0.0-preview.3.26207.106 35 04/16/2026
11.0.0-preview.2.26159.112 37 03/11/2026
11.0.0-preview.1.26104.118 46 02/13/2026
10.0.11 9 08/11/2026
10.0.10 15 07/16/2026
10.0.9 22 06/11/2026
10.0.8 23 05/14/2026
10.0.7 27 04/23/2026
10.0.6 30 04/16/2026
10.0.5 32 03/13/2026
10.0.4 37 03/11/2026
10.0.3 39 02/13/2026
10.0.2 44 01/18/2026
10.0.1 44 12/09/2025
10.0.0 50 11/14/2025
10.0.0-rc.2.25502.107 68 10/19/2025
10.0.0-rc.1.25451.107 69 09/20/2025
10.0.0-preview.7.25380.108 67 09/05/2025
10.0.0-preview.6.25358.103 74 09/05/2025
10.0.0-preview.5.25277.114 75 09/05/2025
10.0.0-preview.4.25258.110 64 09/05/2025
10.0.0-preview.3.25171.5 72 09/05/2025
10.0.0-preview.2.25163.2 70 09/05/2025
10.0.0-preview.1.25080.5 72 09/05/2025
9.0.19 9 08/11/2026
9.0.18 14 07/16/2026
9.0.17 23 06/11/2026
9.0.16 25 05/14/2026
9.0.15 28 04/16/2026
9.0.14 38 03/11/2026
9.0.13 39 02/13/2026
9.0.12 50 01/18/2026
9.0.11 51 11/15/2025
9.0.10 56 10/19/2025
9.0.9 66 09/21/2025
9.0.8 64 09/05/2025
9.0.7 63 09/05/2025
9.0.6 62 09/05/2025
9.0.5 65 09/05/2025
9.0.4 64 09/05/2025
9.0.3 61 09/05/2025
9.0.2 64 09/05/2025
9.0.1 65 09/05/2025
9.0.0 67 09/05/2025
9.0.0-rc.2.24473.5 76 09/05/2025
9.0.0-rc.1.24431.7 74 09/05/2025
9.0.0-preview.7.24405.7 78 09/05/2025
9.0.0-preview.6.24327.7 74 09/05/2025
9.0.0-preview.5.24306.7 75 09/05/2025
9.0.0-preview.4.24266.19 68 09/05/2025
9.0.0-preview.3.24172.9 66 09/05/2025
9.0.0-preview.2.24128.5 69 09/05/2025
9.0.0-preview.1.24080.9 71 09/05/2025
8.0.0 66 09/05/2025
8.0.0-rc.2.23479.6 68 09/05/2025
8.0.0-rc.1.23419.4 70 09/05/2025
8.0.0-preview.7.23375.6 71 09/05/2025
8.0.0-preview.6.23329.7 74 09/05/2025
8.0.0-preview.5.23280.8 75 09/05/2025
8.0.0-preview.4.23259.5 72 09/05/2025
8.0.0-preview.3.23174.8 72 09/05/2025
8.0.0-preview.2.23128.3 71 09/05/2025
8.0.0-preview.1.23110.8 73 09/05/2025
7.0.0 65 09/05/2025
7.0.0-rc.2.22472.3 76 09/05/2025
7.0.0-rc.1.22426.10 74 09/05/2025
7.0.0-preview.7.22375.6 68 09/05/2025
7.0.0-preview.6.22324.4 64 09/05/2025
7.0.0-preview.5.22301.12 74 09/05/2025
7.0.0-preview.4.22229.4 77 09/05/2025
7.0.0-preview.3.22175.4 71 09/05/2025
7.0.0-preview.2.22152.2 75 09/05/2025
7.0.0-preview.1.22076.8 73 09/05/2025
6.0.1 67 09/05/2025
6.0.0 66 09/05/2025
6.0.0-rc.2.21480.5 69 09/05/2025
6.0.0-rc.1.21451.13 71 09/05/2025
6.0.0-preview.7.21377.19 78 09/05/2025
6.0.0-preview.6.21352.12 73 09/05/2025
6.0.0-preview.5.21301.5 75 09/05/2025
6.0.0-preview.4.21253.7 71 09/05/2025
6.0.0-preview.3.21201.4 75 09/05/2025
6.0.0-preview.2.21154.6 70 09/05/2025
6.0.0-preview.1.21102.12 76 09/05/2025
5.0.0 68 09/05/2025
5.0.0-rc.2.20475.5 69 09/05/2025
5.0.0-rc.1.20451.14 74 09/05/2025
5.0.0-preview.8.20407.11 75 09/05/2025
5.0.0-preview.7.20364.11 69 09/05/2025
5.0.0-preview.6.20305.6 75 09/05/2025
5.0.0-preview.5.20278.1 74 09/05/2025
5.0.0-preview.4.20251.6 75 09/05/2025
5.0.0-preview.3.20215.2 71 09/05/2025
5.0.0-preview.2.20160.3 75 09/05/2025
5.0.0-preview.1.20120.4 74 09/05/2025
3.1.32 63 09/05/2025
3.1.31 64 09/05/2025
3.1.30 59 09/05/2025
3.1.29 64 09/05/2025
3.1.28 59 09/05/2025
3.1.27 62 09/05/2025
3.1.26 60 09/05/2025
3.1.25 62 09/05/2025
3.1.24 63 09/05/2025
3.1.23 64 09/05/2025
3.1.22 63 09/05/2025
3.1.21 66 09/05/2025
3.1.20 64 09/05/2025
3.1.19 65 09/05/2025
3.1.18 64 09/05/2025
3.1.17 63 09/05/2025
3.1.16 61 09/05/2025
3.1.15 63 09/05/2025
3.1.14 64 09/05/2025
3.1.13 65 09/05/2025
3.1.12 67 09/05/2025
3.1.11 61 09/05/2025
3.1.10 63 09/05/2025
3.1.9 64 09/05/2025
3.1.8 62 09/05/2025
3.1.7 61 09/05/2025
3.1.6 64 09/05/2025
3.1.5 64 09/05/2025
3.1.4 62 09/05/2025
3.1.3 65 09/05/2025
3.1.2 60 09/05/2025
3.1.1 65 09/05/2025
3.1.0 60 09/05/2025
3.1.0-preview3.19553.2 70 09/05/2025
3.1.0-preview2.19525.4 70 09/05/2025
3.1.0-preview1.19506.1 72 09/05/2025
3.0.3 62 09/05/2025
3.0.2 63 09/05/2025
3.0.1 60 09/05/2025
3.0.0 69 09/05/2025
3.0.0-rc1.19456.10 65 09/05/2025
3.0.0-preview9.19423.4 63 09/05/2025
3.0.0-preview8.19405.4 64 09/05/2025
3.0.0-preview7.19362.4 68 09/05/2025
3.0.0-preview6.19304.6 65 09/05/2025
3.0.0-preview5.19227.9 67 09/05/2025
3.0.0-preview4.19216.2 68 09/05/2025
3.0.0-preview3.19153.1 68 09/05/2025
3.0.0-preview.19074.2 68 09/05/2025
3.0.0-preview.18572.1 68 09/05/2025
2.2.0 65 09/05/2025
2.2.0-preview3-35497 61 09/05/2025
2.2.0-preview2-35157 66 09/05/2025
2.2.0-preview1-35029 65 09/05/2025
2.1.1 64 09/05/2025
2.1.0 61 09/05/2025
2.1.0-rc1-final 66 09/05/2025
2.1.0-preview2-final 62 09/05/2025
2.1.0-preview1-final 63 09/05/2025
2.0.2 63 09/05/2025
2.0.1 59 09/05/2025
2.0.0 60 09/05/2025
2.0.0-preview2-final 66 09/05/2025
2.0.0-preview1-final 60 09/05/2025
1.1.2 67 09/05/2025
1.1.1 62 09/05/2025
1.1.0 62 09/05/2025
1.1.0-preview1-final 67 09/05/2025
1.0.2 63 09/05/2025
1.0.1 63 09/05/2025
1.0.0 65 09/05/2025
1.0.0-rc2-final 63 09/05/2025
1.0.0-rc1-final 62 09/05/2025