Skip to main content
DotNetConfig.CommandLine package icon

DotNetConfig.CommandLine

Extensions to System.CommandLine to automatically read default values from .netconfig files. Usage: var root = new RootCommand { // child commands, arguments, options }.WithConfigurableDefaults(); The following heuristics are applied when providing default values: * Only arguments/options without a default value are processed. * Section matches root command name, subsection (dot-separated) for each additional nested command level (i.e. `[mytool "mycommand.myverb"]`). * Compatible arguments/options (same name/type) can be placed in ancestor section/subsection to affect default value of entire subtree. * All the types supported by System.CommandLine for multiple artity arguments and options are automatically populated: arrays, `IEnumerable{T}`, `ICollection{T}`, `IList{T}` and `List{T}`: .netconfig can provide multi-valued variables for those. * Numbers can be either `int` or `long`. Built from https://github.com/dotnetconfig/dotnet-config/tree/a26b4acaf

Total Downloads
11.8K
11,806
Published
Jul 30, 2021
Latest stable version

Install

.NET CLI
dotnet add package DotNetConfig.CommandLine --version 1.0.5
Package Manager Console
Install-Package DotNetConfig.CommandLine -Version 1.0.5
PackageReference
<PackageReference Include="DotNetConfig.CommandLine" Version="1.0.5" />

Frameworks

.NETStandard2.0

Dependencies

DotNetConfig
.NETStandard2.0
[1.0.5, )
System.CommandLine
.NETStandard2.0
[2.0.0-beta1.21216.1, )

Adoption guide

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.