DEMA Consulting template project for DotNet Tools, demonstrating best practices for building command-line tools with .NET.
This template demonstrates:
- Standardized Command-Line Interface: Context class handling common arguments
(
--version,--help,--silent,--validate,--results,--log) - Self-Validation: Built-in validation tests with TRX/JUnit output
- Multi-Platform Support: Builds and runs on Windows and Linux
- Multi-Runtime Support: Targets .NET 8, 9, and 10
- Comprehensive CI/CD: GitHub Actions workflows with quality checks, builds, and integration tests
- Documentation Generation: Automated build notes, user guide, code quality reports, requirements, justifications, and trace matrix
Install the tool globally using the .NET CLI:
dotnet tool install -g DemaConsulting.TemplateDotNetTool# Display version
templatetool --version
# Display help
templatetool --help
# Run self-validation
templatetool --validate
# Save validation results
templatetool --validate --results results.trx
# Silent mode with logging
templatetool --silent --log output.log| Option | Description |
|---|---|
-v, --version |
Display version information |
-?, -h, --help |
Display help message |
--silent |
Suppress console output |
--validate |
Run self-validation |
--results <file> |
Write validation results to file (TRX or JUnit format) |
--log <file> |
Write output to log file |
Generated documentation includes:
- Build Notes: Release information and changes
- User Guide: Comprehensive usage documentation
- Code Quality Report: CodeQL and SonarCloud analysis results
- Requirements: Functional and non-functional requirements
- Requirements Justifications: Detailed requirement rationale
- Trace Matrix: Requirements to test traceability
Copyright (c) DEMA Consulting. Licensed under the MIT License. See LICENSE for details.