Microsoft.Extensions.Configuration.CommandLine 9.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.
152
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
137
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
136
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.
132
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
123
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
121
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
117
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
112
R4Mvc.Tools
R4Mvc is a tool that generates strongly typed helpers for ASP.NET Core MVC.
102
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
28
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
26
Volo.Abp.Core
Package Description
26
Volo.Abp.Core
Package Description
25
Volo.Abp.Core
Package Description
24
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
24
Microsoft.Extensions.Hosting
.NET Core hosting and startup infrastructures for applications.
24

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