Microsoft.Extensions.Configuration.CommandLine 10.0.15

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.
179
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
163
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
162
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.
156
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
149
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
147
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.
133
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
125
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
57
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
56
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
55
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
55
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
54
Volo.Abp.Core
Package Description
54
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
53
Volo.Abp.Core
Package Description
53

Version Downloads Last updated
11.0.0 3 11/10/2026
11.0.0-rc.3.26522.148 9 10/27/2026
11.0.0-rc.2.26504.105 11 10/14/2026
11.0.0-rc.1.26425.128 19 9/10/2026
11.0.0-preview.7.26381.103 23 8/13/2026
11.0.0-preview.6.26359.118 26 7/17/2026
11.0.0-preview.5.26302.115 34 6/10/2026
11.0.0-preview.4.26230.115 33 5/13/2026
11.0.0-preview.3.26207.106 32 5/3/2026
11.0.0-preview.2.26159.112 35 3/12/2026
11.0.0-preview.1.26104.118 38 2/12/2026
10.0.15 4 11/10/2026
10.0.14 11 10/27/2026
10.0.13 11 10/14/2026
10.0.12 17 9/10/2026
10.0.11 26 8/13/2026
10.0.10 25 7/17/2026
10.0.9 34 6/10/2026
10.0.8 32 5/13/2026
10.0.7 34 5/4/2026
10.0.6 39 5/3/2026
10.0.5 38 3/14/2026
10.0.4 37 3/12/2026
10.0.3 37 2/12/2026
10.0.2 42 1/15/2026
10.0.1 45 12/10/2025
10.0.0 76 11/13/2025
10.0.0-rc.2.25502.107 79 10/14/2025
10.0.0-rc.1.25451.107 97 9/10/2025
10.0.0-preview.7.25380.108 89 8/13/2025
10.0.0-preview.6.25358.103 93 7/16/2025
10.0.0-preview.5.25277.114 81 6/8/2025
10.0.0-preview.4.25258.110 107 5/15/2025
10.0.0-preview.3.25171.5 96 4/11/2025
10.0.0-preview.2.25163.2 96 3/20/2025
10.0.0-preview.1.25080.5 97 2/26/2025
9.0.23 3 11/10/2026
9.0.22 11 10/27/2026
9.0.21 14 10/14/2026
9.0.20 18 9/9/2026
9.0.19 21 8/13/2026
9.0.18 29 7/16/2026
9.0.17 38 6/10/2026
9.0.16 39 5/13/2026
9.0.15 36 5/3/2026
9.0.14 37 3/12/2026
9.0.13 33 2/12/2026
9.0.12 43 1/16/2026
9.0.11 64 11/13/2025
9.0.10 76 10/14/2025
9.0.9 81 9/10/2025
9.0.8 87 8/5/2025
9.0.7 95 7/12/2025
9.0.6 83 6/12/2025
9.0.5 105 5/16/2025
9.0.4 109 4/9/2025
9.0.3 102 3/13/2025
9.0.2 104 2/12/2025
9.0.1 118 1/18/2025
9.0.0 113 11/15/2024
9.0.0-rc.2.24473.5 105 10/15/2024
9.0.0-rc.1.24431.7 121 9/11/2024
9.0.0-preview.7.24405.7 143 8/15/2024
9.0.0-preview.6.24327.7 141 7/10/2024
9.0.0-preview.5.24306.7 124 6/14/2024
9.0.0-preview.4.24266.19 127 5/24/2024
9.0.0-preview.3.24172.9 140 4/16/2024
9.0.0-preview.2.24128.5 139 3/29/2024
9.0.0-preview.1.24080.9 141 2/19/2024
8.0.0 145 11/16/2023
8.0.0-rc.2.23479.6 142 10/24/2023
8.0.0-rc.1.23419.4 153 9/17/2023
8.0.0-preview.7.23375.6 153 8/23/2023
8.0.0-preview.6.23329.7 155 7/22/2023
8.0.0-preview.5.23280.8 157 8/3/2023
8.0.0-preview.4.23259.5 148 8/3/2023
8.0.0-preview.3.23174.8 153 5/14/2023
8.0.0-preview.2.23128.3 135 5/17/2023
8.0.0-preview.1.23110.8 135 2/24/2023
7.0.0 140 12/5/2022
7.0.0-rc.2.22472.3 135 12/5/2022
7.0.0-rc.1.22426.10 161 9/16/2022
7.0.0-preview.7.22375.6 145 8/16/2022
7.0.0-preview.6.22324.4 143 9/16/2022
7.0.0-preview.5.22301.12 143 6/29/2022
7.0.0-preview.4.22229.4 150 6/29/2022
7.0.0-preview.3.22175.4 144 6/29/2022
7.0.0-preview.2.22152.2 158 6/29/2022
7.0.0-preview.1.22076.8 152 6/29/2022
6.0.2-mauipre.1.22102.15 164 6/29/2022
6.0.2-mauipre.1.22054.8 157 6/29/2022
6.0.1 124 11/18/2024
6.0.0 148 6/29/2022
6.0.0-rc.2.21480.5 159 6/29/2022
6.0.0-rc.1.21451.13 146 6/29/2022
6.0.0-preview.7.21377.19 139 8/29/2022
6.0.0-preview.6.21352.12 151 10/6/2022
6.0.0-preview.5.21301.5 160 10/10/2022
6.0.0-preview.4.21253.7 140 9/26/2022
6.0.0-preview.3.21201.4 132 10/23/2022
6.0.0-preview.2.21154.6 154 9/13/2022
6.0.0-preview.1.21102.12 134 2/14/2023
5.0.0 145 2/22/2023
5.0.0-rc.2.20475.5 153 12/19/2022
5.0.0-rc.1.20451.14 142 7/31/2022
5.0.0-preview.8.20407.11 151 1/27/2023
5.0.0-preview.7.20364.11 154 9/2/2022
5.0.0-preview.6.20305.6 149 9/22/2022
5.0.0-preview.5.20278.1 125 2/5/2023
5.0.0-preview.4.20251.6 144 10/9/2022
5.0.0-preview.3.20215.2 147 2/24/2023
5.0.0-preview.2.20160.3 137 10/17/2022
5.0.0-preview.1.20120.4 165 10/17/2022
3.1.32 154 1/27/2023
3.1.31 152 11/23/2022
3.1.30 140 10/23/2022
3.1.29 138 9/16/2022
3.1.28 136 9/16/2022
3.1.27 157 9/16/2022
3.1.26 134 2/24/2023
3.1.25 151 9/26/2022
3.1.24 119 1/4/2023
3.1.23 133 2/24/2023
3.1.22 131 7/26/2022
3.1.21 159 6/29/2022
3.1.20 158 6/29/2022
3.1.19 153 6/29/2022
3.1.18 145 6/29/2022
3.1.17 148 6/29/2022
3.1.16 147 6/29/2022
3.1.15 145 6/29/2022
3.1.14 142 6/29/2022
3.1.13 133 6/29/2022
3.1.12 146 6/29/2022
3.1.11 148 6/29/2022
3.1.10 139 6/29/2022
3.1.9 141 10/16/2022
3.1.8 137 9/2/2022
3.1.7 157 8/31/2022
3.1.6 139 8/12/2022
3.1.5 146 10/18/2022
3.1.4 146 2/24/2023
3.1.3 158 11/29/2022
3.1.2 145 6/29/2022
3.1.1 154 6/29/2022
3.1.0 141 6/29/2022
3.1.0-preview3.19553.2 131 6/29/2022
3.1.0-preview2.19525.4 134 6/29/2022
3.1.0-preview1.19506.1 144 6/29/2022
3.0.3 135 6/29/2022
3.0.2 142 6/29/2022
3.0.1 132 6/29/2022
3.0.0 144 6/29/2022
3.0.0-rc1.19456.10 154 6/29/2022
3.0.0-preview9.19423.4 122 6/29/2022
3.0.0-preview8.19405.4 141 6/29/2022
3.0.0-preview7.19362.4 140 6/29/2022
3.0.0-preview6.19304.6 127 6/29/2022
3.0.0-preview5.19227.9 147 6/29/2022
3.0.0-preview4.19216.2 140 6/29/2022
3.0.0-preview3.19153.1 142 6/29/2022
3.0.0-preview.19074.2 135 6/29/2022
3.0.0-preview.18572.1 143 6/29/2022
2.2.0 151 6/29/2022
2.2.0-preview3-35497 134 6/29/2022
2.2.0-preview2-35157 165 6/29/2022
2.2.0-preview1-35029 139 6/29/2022
2.1.1 132 6/29/2022
2.1.0 154 6/29/2022
2.1.0-rc1-final 151 6/29/2022
2.1.0-preview2-final 158 6/29/2022
2.1.0-preview1-final 141 6/29/2022
2.0.2 158 6/29/2022
2.0.1 138 6/29/2022
2.0.0 130 6/29/2022
2.0.0-preview2-final 132 6/29/2022
2.0.0-preview1-final 149 6/29/2022
1.1.2 169 6/29/2022
1.1.1 145 6/29/2022
1.1.0 144 6/29/2022
1.1.0-preview1-final 143 6/29/2022
1.0.2 159 6/29/2022
1.0.1 148 6/29/2022
1.0.0 145 6/29/2022
1.0.0-rc2-final 142 6/29/2022
1.0.0-rc1-final 133 6/29/2022