You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the verbs I noticed that the verb commmand fails with a System.ArgumentNullException if the long name for an option is not set. If you set the long name everything works fine.
So, if you use an option like this
[Option('v', null, HelpText = "Print details during execution.")]
public bool Verbose { get; set; }
you get this:
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: longName
at CommandLine.OptionAttribute..ctor(String shortName, String longName)
at CommandLine.OptionAttribute..ctor(Char shortName, String longName)
calling "program VERBNAME" or "program help VERBNAME"
The text was updated successfully, but these errors were encountered:
lucaghersi
changed the title
Verb "help" fails if option has no long name
Verb fails if option has no long name
Sep 19, 2017
Using the verbs I noticed that the verb commmand fails with a System.ArgumentNullException if the long name for an option is not set. If you set the long name everything works fine.
So, if you use an option like this
you get this:
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: longName
at CommandLine.OptionAttribute..ctor(String shortName, String longName)
at CommandLine.OptionAttribute..ctor(Char shortName, String longName)
calling "program VERBNAME" or "program help VERBNAME"
The text was updated successfully, but these errors were encountered: