Microsoft.Extensions.Configuration.CommandLine 9.0.16

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
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
159
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
146
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
144
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
140
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
139
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
129
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
124
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
118
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
106
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
34
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
33
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
32
Volo.Abp.Core
Package Description
31
Volo.Abp.Core
Package Description
30
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
30

Version Downloads Last updated
11.0.0-preview.4.26230.115 6 5/13/2026
11.0.0-preview.3.26207.106 10 5/3/2026
11.0.0-preview.2.26159.112 12 3/12/2026
11.0.0-preview.1.26104.118 16 2/12/2026
10.0.8 6 5/13/2026
10.0.7 9 5/4/2026
10.0.6 10 5/3/2026
10.0.5 14 3/14/2026
10.0.4 12 3/12/2026
10.0.3 14 2/12/2026
10.0.2 16 1/15/2026
10.0.1 21 12/10/2025
10.0.0 51 11/13/2025
10.0.0-rc.2.25502.107 58 10/14/2025
10.0.0-rc.1.25451.107 73 9/10/2025
10.0.0-preview.7.25380.108 67 8/13/2025
10.0.0-preview.6.25358.103 64 7/16/2025
10.0.0-preview.5.25277.114 62 6/8/2025
10.0.0-preview.4.25258.110 86 5/15/2025
10.0.0-preview.3.25171.5 78 4/11/2025
10.0.0-preview.2.25163.2 77 3/20/2025
10.0.0-preview.1.25080.5 75 2/26/2025
9.0.16 8 5/13/2026
9.0.15 11 5/3/2026
9.0.14 14 3/12/2026
9.0.13 13 2/12/2026
9.0.12 18 1/16/2026
9.0.11 38 11/13/2025
9.0.10 56 10/14/2025
9.0.9 58 9/10/2025
9.0.8 66 8/5/2025
9.0.7 73 7/12/2025
9.0.6 60 6/12/2025
9.0.5 85 5/16/2025
9.0.4 83 4/9/2025
9.0.3 84 3/13/2025
9.0.2 87 2/12/2025
9.0.1 101 1/18/2025
9.0.0 100 11/15/2024
9.0.0-rc.2.24473.5 88 10/15/2024
9.0.0-rc.1.24431.7 103 9/11/2024
9.0.0-preview.7.24405.7 127 8/15/2024
9.0.0-preview.6.24327.7 118 7/10/2024
9.0.0-preview.5.24306.7 108 6/14/2024
9.0.0-preview.4.24266.19 108 5/24/2024
9.0.0-preview.3.24172.9 120 4/16/2024
9.0.0-preview.2.24128.5 120 3/29/2024
9.0.0-preview.1.24080.9 122 2/19/2024
8.0.0 127 11/16/2023
8.0.0-rc.2.23479.6 128 10/24/2023
8.0.0-rc.1.23419.4 136 9/17/2023
8.0.0-preview.7.23375.6 135 8/23/2023
8.0.0-preview.6.23329.7 133 7/22/2023
8.0.0-preview.5.23280.8 134 8/3/2023
8.0.0-preview.4.23259.5 131 8/3/2023
8.0.0-preview.3.23174.8 130 5/14/2023
8.0.0-preview.2.23128.3 122 5/17/2023
8.0.0-preview.1.23110.8 115 2/24/2023
7.0.0 119 12/5/2022
7.0.0-rc.2.22472.3 118 12/5/2022
7.0.0-rc.1.22426.10 144 9/16/2022
7.0.0-preview.7.22375.6 124 8/16/2022
7.0.0-preview.6.22324.4 125 9/16/2022
7.0.0-preview.5.22301.12 123 6/29/2022
7.0.0-preview.4.22229.4 134 6/29/2022
7.0.0-preview.3.22175.4 127 6/29/2022
7.0.0-preview.2.22152.2 142 6/29/2022
7.0.0-preview.1.22076.8 137 6/29/2022
6.0.2-mauipre.1.22102.15 146 6/29/2022
6.0.2-mauipre.1.22054.8 138 6/29/2022
6.0.1 105 11/18/2024
6.0.0 131 6/29/2022
6.0.0-rc.2.21480.5 142 6/29/2022
6.0.0-rc.1.21451.13 131 6/29/2022
6.0.0-preview.7.21377.19 120 8/29/2022
6.0.0-preview.6.21352.12 133 10/6/2022
6.0.0-preview.5.21301.5 142 10/10/2022
6.0.0-preview.4.21253.7 123 9/26/2022
6.0.0-preview.3.21201.4 115 10/23/2022
6.0.0-preview.2.21154.6 138 9/13/2022
6.0.0-preview.1.21102.12 118 2/14/2023
5.0.0 125 2/22/2023
5.0.0-rc.2.20475.5 133 12/19/2022
5.0.0-rc.1.20451.14 125 7/31/2022
5.0.0-preview.8.20407.11 134 1/27/2023
5.0.0-preview.7.20364.11 133 9/2/2022
5.0.0-preview.6.20305.6 133 9/22/2022
5.0.0-preview.5.20278.1 108 2/5/2023
5.0.0-preview.4.20251.6 125 10/9/2022
5.0.0-preview.3.20215.2 129 2/24/2023
5.0.0-preview.2.20160.3 119 10/17/2022
5.0.0-preview.1.20120.4 147 10/17/2022
3.1.32 137 1/27/2023
3.1.31 135 11/23/2022
3.1.30 122 10/23/2022
3.1.29 120 9/16/2022
3.1.28 117 9/16/2022
3.1.27 140 9/16/2022
3.1.26 118 2/24/2023
3.1.25 134 9/26/2022
3.1.24 100 1/4/2023
3.1.23 115 2/24/2023
3.1.22 112 7/26/2022
3.1.21 143 6/29/2022
3.1.20 141 6/29/2022
3.1.19 134 6/29/2022
3.1.18 129 6/29/2022
3.1.17 128 6/29/2022
3.1.16 130 6/29/2022
3.1.15 129 6/29/2022
3.1.14 122 6/29/2022
3.1.13 116 6/29/2022
3.1.12 129 6/29/2022
3.1.11 129 6/29/2022
3.1.10 123 6/29/2022
3.1.9 124 10/16/2022
3.1.8 120 9/2/2022
3.1.7 137 8/31/2022
3.1.6 122 8/12/2022
3.1.5 128 10/18/2022
3.1.4 128 2/24/2023
3.1.3 141 11/29/2022
3.1.2 126 6/29/2022
3.1.1 137 6/29/2022
3.1.0 126 6/29/2022
3.1.0-preview3.19553.2 115 6/29/2022
3.1.0-preview2.19525.4 115 6/29/2022
3.1.0-preview1.19506.1 125 6/29/2022
3.0.3 124 6/29/2022
3.0.2 123 6/29/2022
3.0.1 116 6/29/2022
3.0.0 128 6/29/2022
3.0.0-rc1.19456.10 134 6/29/2022
3.0.0-preview9.19423.4 106 6/29/2022
3.0.0-preview8.19405.4 122 6/29/2022
3.0.0-preview7.19362.4 122 6/29/2022
3.0.0-preview6.19304.6 113 6/29/2022
3.0.0-preview5.19227.9 130 6/29/2022
3.0.0-preview4.19216.2 128 6/29/2022
3.0.0-preview3.19153.1 125 6/29/2022
3.0.0-preview.19074.2 118 6/29/2022
3.0.0-preview.18572.1 124 6/29/2022
2.2.0 132 6/29/2022
2.2.0-preview3-35497 117 6/29/2022
2.2.0-preview2-35157 146 6/29/2022
2.2.0-preview1-35029 122 6/29/2022
2.1.1 117 6/29/2022
2.1.0 132 6/29/2022
2.1.0-rc1-final 133 6/29/2022
2.1.0-preview2-final 140 6/29/2022
2.1.0-preview1-final 128 6/29/2022
2.0.2 140 6/29/2022
2.0.1 122 6/29/2022
2.0.0 110 6/29/2022
2.0.0-preview2-final 115 6/29/2022
2.0.0-preview1-final 136 6/29/2022
1.1.2 150 6/29/2022
1.1.1 125 6/29/2022
1.1.0 128 6/29/2022
1.1.0-preview1-final 124 6/29/2022
1.0.2 143 6/29/2022
1.0.1 131 6/29/2022
1.0.0 128 6/29/2022
1.0.0-rc2-final 123 6/29/2022
1.0.0-rc1-final 117 6/29/2022