Description
I was hoping that someone will be able to help me, with what I am referring to as global parameters, but this might be known under a different name.
When parsing my input arguments, I want to have an option to include things like a -v
argument, which version parsed, will print out the version number of my command line tool. In addition, I want to be able to have verbs for doing specific pieces of functionality, like transform
, and then have additional arguments for this command.
Individually, I can get this to work, i.e. have an Option
for -v
, and have a VerbOption
for transform
, however, I don't seem to be able to combine them. Am I missing something?
So to recap, what I would like to be able to do is:
my.exe -v
my.exe transform -i "c:/temp/input.xml" -o "c:/temp/output.html"
Is this possible?
Each time I try it, my Version Option
is always false.
NOTE: I am using CommandLineParser 1.9.71.