Microsoft.Extensions.Configuration.CommandLine 11.0.0-preview.1.26104.118

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
Hosting and startup infrastructures for applications.
35
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
34
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
34
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
33
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
33
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
32
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
32

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

.NET Framework 4.6.2

.NET 10.0

.NET 11.0

.NET Standard 2.0

Version Downloads Last updated
11.0.0-preview.1.26104.118 7 02/13/2026
10.0.3 7 02/13/2026
10.0.2 13 01/18/2026
10.0.1 17 12/09/2025
10.0.0 19 11/14/2025
10.0.0-rc.2.25502.107 25 10/19/2025
10.0.0-rc.1.25451.107 30 09/20/2025
10.0.0-preview.7.25380.108 29 09/05/2025
10.0.0-preview.6.25358.103 33 09/05/2025
10.0.0-preview.5.25277.114 29 09/05/2025
10.0.0-preview.4.25258.110 29 09/05/2025
10.0.0-preview.3.25171.5 29 09/05/2025
10.0.0-preview.2.25163.2 33 09/05/2025
10.0.0-preview.1.25080.5 28 09/05/2025
9.0.13 7 02/13/2026
9.0.12 12 01/18/2026
9.0.11 21 11/15/2025
9.0.10 25 10/19/2025
9.0.9 30 09/21/2025
9.0.8 30 09/05/2025
9.0.7 32 09/05/2025
9.0.6 30 09/05/2025
9.0.5 32 09/05/2025
9.0.4 30 09/05/2025
9.0.3 30 09/05/2025
9.0.2 31 09/05/2025
9.0.1 31 09/05/2025
9.0.0 31 09/05/2025
9.0.0-rc.2.24473.5 32 09/05/2025
9.0.0-rc.1.24431.7 32 09/05/2025
9.0.0-preview.7.24405.7 32 09/05/2025
9.0.0-preview.6.24327.7 31 09/05/2025
9.0.0-preview.5.24306.7 31 09/05/2025
9.0.0-preview.4.24266.19 28 09/05/2025
9.0.0-preview.3.24172.9 30 09/05/2025
9.0.0-preview.2.24128.5 33 09/05/2025
9.0.0-preview.1.24080.9 31 09/05/2025
8.0.0 30 09/05/2025
8.0.0-rc.2.23479.6 31 09/05/2025
8.0.0-rc.1.23419.4 32 09/05/2025
8.0.0-preview.7.23375.6 32 09/05/2025
8.0.0-preview.6.23329.7 31 09/05/2025
8.0.0-preview.5.23280.8 32 09/05/2025
8.0.0-preview.4.23259.5 32 09/05/2025
8.0.0-preview.3.23174.8 32 09/05/2025
8.0.0-preview.2.23128.3 30 09/05/2025
8.0.0-preview.1.23110.8 32 09/05/2025
7.0.0 31 09/05/2025
7.0.0-rc.2.22472.3 36 09/05/2025
7.0.0-rc.1.22426.10 33 09/05/2025
7.0.0-preview.7.22375.6 33 09/05/2025
7.0.0-preview.6.22324.4 30 09/05/2025
7.0.0-preview.5.22301.12 33 09/05/2025
7.0.0-preview.4.22229.4 32 09/05/2025
7.0.0-preview.3.22175.4 32 09/05/2025
7.0.0-preview.2.22152.2 33 09/05/2025
7.0.0-preview.1.22076.8 31 09/05/2025
6.0.1 32 09/05/2025
6.0.0 32 09/05/2025
6.0.0-rc.2.21480.5 30 09/05/2025
6.0.0-rc.1.21451.13 32 09/05/2025
6.0.0-preview.7.21377.19 34 09/05/2025
6.0.0-preview.6.21352.12 31 09/05/2025
6.0.0-preview.5.21301.5 31 09/05/2025
6.0.0-preview.4.21253.7 30 09/05/2025
6.0.0-preview.3.21201.4 34 09/05/2025
6.0.0-preview.2.21154.6 30 09/05/2025
6.0.0-preview.1.21102.12 33 09/05/2025
5.0.0 31 09/05/2025
5.0.0-rc.2.20475.5 31 09/05/2025
5.0.0-rc.1.20451.14 30 09/05/2025
5.0.0-preview.8.20407.11 34 09/05/2025
5.0.0-preview.7.20364.11 30 09/05/2025
5.0.0-preview.6.20305.6 32 09/05/2025
5.0.0-preview.5.20278.1 30 09/05/2025
5.0.0-preview.4.20251.6 33 09/05/2025
5.0.0-preview.3.20215.2 32 09/05/2025
5.0.0-preview.2.20160.3 29 09/05/2025
5.0.0-preview.1.20120.4 30 09/05/2025
3.1.32 30 09/05/2025
3.1.31 29 09/05/2025
3.1.30 29 09/05/2025
3.1.29 29 09/05/2025
3.1.28 31 09/05/2025
3.1.27 30 09/05/2025
3.1.26 28 09/05/2025
3.1.25 29 09/05/2025
3.1.24 29 09/05/2025
3.1.23 30 09/05/2025
3.1.22 31 09/05/2025
3.1.21 33 09/05/2025
3.1.20 31 09/05/2025
3.1.19 30 09/05/2025
3.1.18 30 09/05/2025
3.1.17 31 09/05/2025
3.1.16 29 09/05/2025
3.1.15 33 09/05/2025
3.1.14 30 09/05/2025
3.1.13 32 09/05/2025
3.1.12 32 09/05/2025
3.1.11 29 09/05/2025
3.1.10 30 09/05/2025
3.1.9 30 09/05/2025
3.1.8 30 09/05/2025
3.1.7 30 09/05/2025
3.1.6 31 09/05/2025
3.1.5 30 09/05/2025
3.1.4 30 09/05/2025
3.1.3 29 09/05/2025
3.1.2 30 09/05/2025
3.1.1 30 09/05/2025
3.1.0 30 09/05/2025
3.1.0-preview3.19553.2 30 09/05/2025
3.1.0-preview2.19525.4 30 09/05/2025
3.1.0-preview1.19506.1 34 09/05/2025
3.0.3 33 09/05/2025
3.0.2 30 09/05/2025
3.0.1 29 09/05/2025
3.0.0 33 09/05/2025
3.0.0-rc1.19456.10 32 09/05/2025
3.0.0-preview9.19423.4 30 09/05/2025
3.0.0-preview8.19405.4 31 09/05/2025
3.0.0-preview7.19362.4 28 09/05/2025
3.0.0-preview6.19304.6 30 09/05/2025
3.0.0-preview5.19227.9 32 09/05/2025
3.0.0-preview4.19216.2 33 09/05/2025
3.0.0-preview3.19153.1 30 09/05/2025
3.0.0-preview.19074.2 32 09/05/2025
3.0.0-preview.18572.1 34 09/05/2025
2.2.0 31 09/05/2025
2.2.0-preview3-35497 29 09/05/2025
2.2.0-preview2-35157 33 09/05/2025
2.2.0-preview1-35029 33 09/05/2025
2.1.1 33 09/05/2025
2.1.0 30 09/05/2025
2.1.0-rc1-final 30 09/05/2025
2.1.0-preview2-final 31 09/05/2025
2.1.0-preview1-final 30 09/05/2025
2.0.2 31 09/05/2025
2.0.1 29 09/05/2025
2.0.0 30 09/05/2025
2.0.0-preview2-final 32 09/05/2025
2.0.0-preview1-final 28 09/05/2025
1.1.2 31 09/05/2025
1.1.1 32 09/05/2025
1.1.0 29 09/05/2025
1.1.0-preview1-final 32 09/05/2025
1.0.2 31 09/05/2025
1.0.1 30 09/05/2025
1.0.0 31 09/05/2025
1.0.0-rc2-final 30 09/05/2025
1.0.0-rc1-final 29 09/05/2025