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

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.
176
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
160
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.
157
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
154
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.
142
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
131
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
123
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
55
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
54
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
52
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
51
Volo.Abp.Core
Package Description
51
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
50
Volo.Abp.Core
Package Description
50

.NET 10.0

.NET 11.0

.NET Framework 4.6.2

.NET Standard 2.0

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