This is an example project that demonstrates how to use a custom IConsole for System.CommandLine command line parser.
To get started download a copy of the source.
Once you have downloaded the source simple run using dotnet. This project is built using net50. If you are using a different version you may need to update the TargetFramework.
To build:
dotnet build
This example project does not have any settings or configuration.
To run:
dotnet run -- --help
This results in the output:
Hello World!
custom-console-example
Console app to demonstrate System.CommandLine.IConsole
Usage:
custom-console-example [options]
Options:
--version Show version information
-?, -h, --help Show help and usage information