Microsoft.Extensions.Configuration.CommandLine 11.0.0-rc.1.26425.128

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.AspNetCore
Microsoft.AspNetCore
18
Microsoft.AspNetCore
Microsoft.AspNetCore
28
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
19
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
20
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
37
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
42
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
46
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications. When using NuGet 3.x this package requires at least version 3.4.
19
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
18
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
19
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
20
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
22

.NET 10.0

.NET 11.0

.NET Framework 4.6.2

.NET Standard 2.0

Version Downloads Last updated
11.0.0-rc.1.26425.128 3 12.09.2026
11.0.0-preview.7.26381.103 2 22.08.2026
11.0.0-preview.6.26359.118 4 21.07.2026
11.0.0-preview.5.26302.115 7 13.06.2026
11.0.0-preview.4.26230.115 6 20.05.2026
11.0.0-preview.3.26207.106 10 27.04.2026
11.0.0-preview.2.26159.112 6 15.03.2026
11.0.0-preview.1.26104.118 9 12.02.2026
10.0.12 2 12.09.2026
10.0.11 2 22.08.2026
10.0.10 5 21.07.2026
10.0.9 7 14.06.2026
10.0.8 7 20.05.2026
10.0.7 9 27.04.2026
10.0.6 11 27.04.2026
10.0.5 8 14.03.2026
10.0.4 7 14.03.2026
10.0.3 8 12.02.2026
10.0.2 16 22.01.2026
10.0.1 12 18.12.2025
10.0.0 12 18.12.2025
10.0.0-rc.2.25502.107 9 22.01.2026
10.0.0-rc.1.25451.107 9 20.12.2025
10.0.0-preview.7.25380.108 10 22.08.2025
10.0.0-preview.6.25358.103 11 08.08.2025
10.0.0-preview.5.25277.114 16 08.06.2025
10.0.0-preview.4.25258.110 19 23.05.2025
10.0.0-preview.3.25171.5 15 23.05.2025
10.0.0-preview.2.25163.2 18 01.06.2025
10.0.0-preview.1.25080.5 16 13.03.2025
9.0.20 2 12.09.2026
9.0.19 5 13.08.2026
9.0.18 5 21.07.2026
9.0.17 10 14.06.2026
9.0.16 9 20.05.2026
9.0.15 9 27.04.2026
9.0.14 17 14.03.2026
9.0.13 8 12.02.2026
9.0.12 18 22.01.2026
9.0.11 10 18.12.2025
9.0.10 12 25.10.2025
9.0.9 13 16.09.2025
9.0.8 30 21.08.2025
9.0.7 15 05.08.2025
9.0.6 16 25.06.2025
9.0.5 37 23.05.2025
9.0.4 24 23.05.2025
9.0.3 20 13.03.2025
9.0.2 19 14.03.2025
9.0.1 20 24.01.2025
9.0.0 39 30.12.2024
9.0.0-rc.2.24473.5 16 01.01.2025
9.0.0-rc.1.24431.7 16 31.12.2024
9.0.0-preview.7.24405.7 17 31.12.2024
9.0.0-preview.6.24327.7 15 01.01.2025
9.0.0-preview.5.24306.7 17 01.01.2025
9.0.0-preview.4.24266.19 13 19.07.2024
9.0.0-preview.3.24172.9 20 01.01.2025
9.0.0-preview.2.24128.5 18 19.07.2024
9.0.0-preview.1.24080.9 16 28.07.2024
8.0.0 61 02.07.2024
8.0.0-rc.2.23479.6 16 31.12.2024
8.0.0-rc.1.23419.4 15 01.01.2025
8.0.0-preview.7.23375.6 15 21.07.2024
8.0.0-preview.6.23329.7 17 01.01.2025
8.0.0-preview.5.23280.8 16 04.07.2024
8.0.0-preview.4.23259.5 22 21.07.2024
8.0.0-preview.3.23174.8 18 02.01.2025
8.0.0-preview.2.23128.3 16 01.01.2025
8.0.0-preview.1.23110.8 15 31.12.2024
7.0.0 23 20.07.2024
7.0.0-rc.2.22472.3 21 01.01.2025
7.0.0-rc.1.22426.10 17 24.07.2024
7.0.0-preview.7.22375.6 16 04.07.2024
7.0.0-preview.6.22324.4 16 26.07.2024
7.0.0-preview.5.22301.12 18 31.12.2024
7.0.0-preview.4.22229.4 18 26.07.2024
7.0.0-preview.3.22175.4 17 17.07.2024
7.0.0-preview.2.22152.2 17 04.07.2024
7.0.0-preview.1.22076.8 18 31.12.2024
6.0.1 20 01.01.2025
6.0.0 19 22.07.2024
6.0.0-rc.2.21480.5 17 24.01.2025
6.0.0-rc.1.21451.13 18 31.12.2024
6.0.0-preview.7.21377.19 20 27.07.2024
6.0.0-preview.6.21352.12 13 01.01.2025
6.0.0-preview.5.21301.5 17 26.07.2024
6.0.0-preview.4.21253.7 16 18.07.2024
6.0.0-preview.3.21201.4 15 17.07.2024
6.0.0-preview.2.21154.6 15 31.12.2024
6.0.0-preview.1.21102.12 15 27.01.2025
5.0.0 29 01.01.2025
5.0.0-rc.2.20475.5 14 01.01.2025
5.0.0-rc.1.20451.14 16 28.01.2025
5.0.0-preview.8.20407.11 15 31.12.2024
5.0.0-preview.7.20364.11 20 20.07.2024
5.0.0-preview.6.20305.6 20 21.07.2024
5.0.0-preview.5.20278.1 15 31.12.2024
5.0.0-preview.4.20251.6 15 16.07.2024
5.0.0-preview.3.20215.2 16 01.01.2025
5.0.0-preview.2.20160.3 13 02.01.2025
5.0.0-preview.1.20120.4 21 01.01.2025
3.1.32 21 02.01.2025
3.1.31 21 21.07.2024
3.1.30 20 01.01.2025
3.1.29 23 04.07.2024
3.1.28 19 01.01.2025
3.1.27 19 31.12.2024
3.1.26 20 31.12.2024
3.1.25 20 04.07.2024
3.1.24 16 31.12.2024
3.1.23 19 01.01.2025
3.1.22 23 01.01.2025
3.1.21 25 20.07.2024
3.1.20 19 15.07.2024
3.1.19 26 21.07.2024
3.1.18 21 26.07.2024
3.1.17 22 20.07.2024
3.1.16 21 04.07.2024
3.1.15 24 18.07.2024
3.1.14 22 03.01.2025
3.1.13 21 01.01.2025
3.1.12 23 20.07.2024
3.1.11 22 26.07.2024
3.1.10 26 01.01.2025
3.1.9 19 01.01.2025
3.1.8 20 20.07.2024
3.1.7 22 29.07.2024
3.1.6 22 26.07.2024
3.1.5 20 31.12.2024
3.1.4 20 18.07.2024
3.1.3 19 21.07.2024
3.1.2 29 01.01.2025
3.1.1 21 21.07.2024
3.1.0 22 16.07.2024
3.1.0-preview3.19553.2 18 27.07.2024
3.1.0-preview2.19525.4 16 04.07.2024
3.1.0-preview1.19506.1 22 27.07.2024
3.0.3 18 31.12.2024
3.0.2 22 27.07.2024
3.0.1 27 01.01.2025
3.0.0 19 01.01.2025
3.0.0-rc1.19456.10 26 17.07.2024
3.0.0-preview9.19423.4 16 04.07.2024
3.0.0-preview8.19405.4 15 18.07.2024
3.0.0-preview7.19362.4 19 31.12.2024
3.0.0-preview6.19304.6 17 18.07.2024
3.0.0-preview5.19227.9 17 01.01.2025
3.0.0-preview4.19216.2 18 15.07.2024
3.0.0-preview3.19153.1 16 20.07.2024
3.0.0-preview.19074.2 16 20.07.2024
3.0.0-preview.18572.1 15 21.07.2024
2.2.0 19 31.12.2024
2.2.0-preview3-35497 21 04.07.2024
2.2.0-preview2-35157 15 19.07.2024
2.2.0-preview1-35029 15 20.07.2024
2.1.1 23 15.07.2024
2.1.0 20 31.12.2024
2.1.0-rc1-final 16 06.01.2025
2.1.0-preview2-final 18 01.01.2025
2.1.0-preview1-final 19 29.07.2024
2.0.2 19 02.01.2025
2.0.1 18 31.12.2024
2.0.0 21 01.01.2025
2.0.0-preview2-final 15 02.01.2025
2.0.0-preview1-final 17 04.07.2024
1.1.2 23 18.07.2024
1.1.1 22 20.07.2024
1.1.0 19 31.12.2024
1.1.0-preview1-final 20 01.01.2025
1.0.2 20 23.07.2024
1.0.1 20 04.07.2024
1.0.0 20 24.07.2024
1.0.0-rc2-final 18 04.07.2024
1.0.0-rc1-final 19 24.07.2024