Template DotNet Tool is a demonstration project that showcases best practices for DEMA Consulting DotNet Tools.
This user guide covers:
- Installation instructions
- Usage examples for common tasks
- Command-line options reference
- Practical examples for various scenarios
This template follows the Continuous Compliance methodology, which ensures compliance evidence is generated automatically on every CI run.
- Requirements Traceability: Every requirement is linked to passing tests, and a trace matrix is auto-generated on each release
- Linting Enforcement: markdownlint, cspell, and yamllint are enforced before any build proceeds
- Automated Audit Documentation: Each release ships with generated requirements, justifications, trace matrix, and quality reports
- CodeQL and SonarCloud: Security and quality analysis runs on every build
Install the tool globally using the .NET CLI:
dotnet tool install -g DemaConsulting.TemplateDotNetToolDisplay the tool version:
templatetool --versionDisplay usage information:
templatetool --helpSelf-validation produces a report demonstrating that Template DotNet Tool is functioning correctly. This is useful in regulated industries where tool validation evidence is required.
To perform self-validation:
templatetool --validateTo save validation results to a file:
templatetool --validate --results results.trxThe results file format is determined by the file extension: .trx for TRX (MSTest) format,
or .xml for JUnit format.
The validation report contains the tool version, machine name, operating system version, .NET runtime version, timestamp, and test results.
Example validation report:
# DEMA Consulting Template DotNet Tool
| Information | Value |
| :------------------ | :------------------------------------------------- |
| Tool Version | 1.0.0 |
| Machine Name | BUILD-SERVER |
| OS Version | Ubuntu 22.04.3 LTS |
| DotNet Runtime | .NET 10.0.0 |
| Time Stamp | 2024-01-15 10:30:00 UTC |
✓ TemplateTool_VersionDisplay - Passed
✓ TemplateTool_HelpDisplay - Passed
Total Tests: 2
Passed: 2
Failed: 0
Each test proves specific functionality works correctly:
TemplateTool_VersionDisplay---versionoutputs a valid version string.TemplateTool_HelpDisplay---helpoutputs usage and options information.
Suppress console output:
templatetool --silentWrite output to a log file:
templatetool --log output.logThe following command-line options are supported:
| 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 |
templatetooltemplatetool --validate --results validation-results.trxtemplatetool --silent --log tool-output.log