Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
0 answers
27 views

I am trying to use the System.CommandLine package to provide a C# .Net8 console application with a hierarchical command-based cli. I'm quite happy with the library so far but there's one thing I can't ...
ZeRemz's user avatar
  • 1,842
0 votes
1 answer
412 views

I have a System.CommandLine .NET 9 command line application. It's mostly used for scheduled tasks and the like, but sometimes users need to run it manually. When run manually, while the help is good, ...
3 votes
1 answer
239 views

This exists as an issues but it hasn't yet been resolved - System.CommandLine: Consider optional case insensitive parsing #133 How can we make it case insensitive?
Tom's user avatar
  • 540
3 votes
2 answers
625 views

How can we override the behavior of --version in C# with System.Commandline? The default implementation unfortunately only shows the version of the app itself, which is rarely useful. If support asks ...
Tom's user avatar
  • 540
0 votes
1 answer
327 views

I am currently trying to implement a couple of worker services. It would be great if I can tell it to add a service based on the command line. Lets say I use the command "Background --service1 --...
0 votes
3 answers
217 views

I'm creating a small console application with .NET8 that requires some parameters to run. I want to add an help if the parameters are empty. I read a Microsoft document where apparently it is easy to ...
0 votes
1 answer
46 views

Besides pre-processing args directly, is there any way to determine if an Option was NOT supplied (while still allowing a default value), in order to potentially fall back on reading <appsettings&...
0 votes
1 answer
474 views

I'm making a console app targeting dotnet core, using Microsofts System.CommandLine namespaces to parse commands. I know these namespaces are in beta and alpha stages, nothing is production here. My ...
4 votes
1 answer
4k views

The following simple Program.cs expects a single argument for a defined root command: using System.CommandLine; var inputArgument = new Argument<string>( name: "--input", ...
0 votes
1 answer
359 views

I am currently configuring a CLI command with the package System.CommandLine. In my CommandClass I have added an option for the user to select if he wants to do a dry-run. How do I check if the user ...
user avatar
4 votes
1 answer
2k views

I would like to pass several numbers to a C# console app and have prepared a .Net Fiddle to demonstrate my issue: private const long DEFAULT_ALPHA_VALUE = 1234567890L; private static long[] alphas = { ...
2 votes
1 answer
188 views

I have difficulties understanding how the System.CommandLine works and have prepared a short .Net fiddle to demonstrate my issue. I am trying to create a C# console app, which would be called with --...
5 votes
1 answer
1k views

I am using System.CommandLine and I wanted to create a mutually exclusive option. The user either has to use --ipAddresses and pass in list of one or more IP addresses OR use --ipAddressesCsv and pass ...
Node.JS's user avatar
  • 1,724
2 votes
0 answers
403 views

I'm using System.CommandLine to handle the command line parameters for an application. I have a required parameter defined as: var foo = new Option<string>("--foo", "...") { ...
4 votes
2 answers
1k views

I know how to tell if an option that I've created was used and how to retrieve its value: // Add the option: var outputOption = new Option<string>(new[] { "-o", "--output" }, ...
hribayz's user avatar
  • 159

15 30 50 per page
1
2 3

AltStyle によって変換されたページ (->オリジナル) /