bilal-fazlani / commanddotnet

A modern framework for building modern CLI apps
https://commanddotnet.bilal-fazlani.com
MIT License
560 stars 32 forks source link

When Using .UseDefaultMiddleware(excludeVersionMiddleware : true) on a single file output received "Unrecognized command or argument '-v'" error #419

Closed kashti3 closed 2 years ago

kashti3 commented 2 years ago

While using... .... AppRunner(settings) .UseDefaultMiddleware(excludeCancellationHandlers : true, excludeVersionMiddleware : true).Run(args); .....

When trying to run [exeFileName] -v receiving "Unrecognized command or argument '-v'" error message

drewburlingame commented 2 years ago

This is by design. The version option is only added to the root command when the version middleware is used.