Skip to content

Latest commit

 

History

History
93 lines (86 loc) · 7.61 KB

Migrating.md

File metadata and controls

93 lines (86 loc) · 7.61 KB

Migrating from Ookii.CommandLine 2.x

Ookii.CommandLine 3.0 has a number of breaking changes from version 2.4 and earlier versions. This article explains what you need to know to migrate your code to the new version.

Although there are quite a few changes, it's likely your application will not require many modifications unless you used subcommands or heavily customized the usage help format.

Breaking API changes

Breaking behavior changes

  • Argument type conversion now defaults to CultureInfo.InvariantCulture, instead of CurrentCulture. This change was made to ensure a consistent parsing experience regardless of the user's regional settings. Only change it if you have a good reason.
  • CommandLineParser automatically adds -Help and -Version arguments by default. If you had arguments with these names, this will not affect you. The -Version argument is not added for subcommands.
  • CommandManager automatically adds a version command by default. If you had a command with this name, this will not affect you.
  • The usage help now includes aliases and default values by default.
  • The default format for showing aliases in the usage help has changed.
  • Usage help uses color output by default (where supported).
  • The LineWrappingTextWriter class does not count virtual terminal sequences as part of the line length by default.