commandlineparser / commandlineparser/commandline

Why "Zero is not allowed in range of sequence option specifications"?

Aperta
#722 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
4.8k
Fork
478
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I have used the old version of the CommandlineParser and it worked fine.
Now I have upgraded my console app to the latest Nuget, run the app and receive:
`System.InvalidOperationException: 'Zero is not allowed in range of sequence option specifications.'`

I have detected that option 't' is the reason of the exception.
How to fix it?

There is my definition

```
class Options
{
[Option('i', "input", Required = true, HelpText = "Input folder/file to be processed.")]
public string InputFolder { get; set; }

[Option('x', "xfiles", Required = false, HelpText = "Exclude files to be processed.")]
public IEnumerable ExcludeFiles { get; set; }

[Option('t', "types", Required = false, Min =0, Max=6,HelpText = "Exclude file extensions to be processed.")]
public IEnumerable ExcludeFileExtensions { get; set; }

[Value(0)]
public int Offset { get; set; } = 0;
}

```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.