An opinionated base library for building dotnet command line tools
- .NET 7.0 SDK
- nuke global tool
dotnet build Bulldog.sln
This project builds with Nuke.
To run the build call build.cmd
which runs the FullBuild target of the nuke build project (The same target that is run as part of CI)
Tests will be run as part of FullBuild
target. To run them explicitly use:
build.cmd Test
Or unit tests and:
build.cmd SmokeTest
For the smoke tests.
To use simply add a package reference to Bulldog package. The package defines a ToolBase class to inherit from which which handles the basics of:
- Logging initialisation with Serilog
- Dependency Injetion initialisation
- Cancellation handling
- CommandLine parsing with CommandlineParser library
The smoke test builds and runs an example tool which can be used as a reference.
Removes the boiler plate setup when writing command line tooling to allow you to focus on the important logic.
It is opinionated enough to enforce some standardisation but with some extension points to avoid being too restrictive.
Versioned using NerdBank.GitVersioning