Microsoft.Extensions.Configuration.CommandLine 10.0.2

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Microsoft.Extensions.Configuration.CommandLine --version 10.0.2
                    
NuGet\Install-Package Microsoft.Extensions.Configuration.CommandLine -Version 10.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="10.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Extensions.Configuration.CommandLine" Version="10.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.Extensions.Configuration.CommandLine --version 10.0.2
                    
#r "nuget: Microsoft.Extensions.Configuration.CommandLine, 10.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Microsoft.Extensions.Configuration.CommandLine@10.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.Extensions.Configuration.CommandLine&version=10.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.Extensions.Configuration.CommandLine&version=10.0.2
                    
Install as a Cake Tool

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.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (657)

Showing the top 5 NuGet packages that depend on Microsoft.Extensions.Configuration.CommandLine:

Package Downloads
Microsoft.Extensions.Hosting

Hosting and startup infrastructures for applications.

Microsoft.AspNetCore

Microsoft.AspNetCore

Volo.Abp.Core

Package Description

Microsoft.AspNetCore.App

Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.

Microsoft.AspNetCore.All

Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.0-preview.3.26207.106 6,719 4/14/2026
11.0.0-preview.2.26159.112 18,052 3/10/2026
11.0.0-preview.1.26104.118 17,577 2/10/2026
10.0.7 2,045,053 4/21/2026
10.0.6 1,317,785 4/14/2026
10.0.5 6,426,236 3/12/2026
10.0.4 639,667 3/10/2026
10.0.3 6,893,109 2/10/2026
10.0.2 7,949,416 1/13/2026
10.0.1 7,935,757 12/9/2025
10.0.0 16,921,232 11/11/2025
10.0.0-rc.2.25502.107 135,682 10/14/2025
10.0.0-rc.1.25451.107 216,575 9/9/2025
9.0.15 264,288 4/14/2026
9.0.14 688,715 3/10/2026
9.0.13 763,282 2/10/2026
9.0.12 1,258,387 1/13/2026
9.0.11 4,154,738 11/11/2025
9.0.10 7,790,732 10/14/2025
9.0.9 10,197,368 9/9/2025
Loading failed