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 for the version, they usually need more than just the app version and we want to show additional information:
- The app version
- The active .NET runtime version
- The versions of the active add-ons
- …
Of course, we don’t want two different command line options to display the version, because then we would have to repeatedly explain that they should not use the standard --version
parameter (because it is useless).
Hence my question:
- How can we remove the default
--version
option inSystem.CommandLine
? - Or how can we override the handler for
--version
?
Thanks a lot for any help!
Thomas
9