Csharp.DotStyle.Templates
1.0.0
dotnet new install Csharp.DotStyle.Templates@1.0.0
DotStyle Templates — Template Pack Source
This repo produces an installable dotnet new template that drops the DotStyle .NET code
governance baseline into an existing repo with one command.
What this template installs
The template creates the standard DotStyle baseline files:
AGENTS.md.editorconfigDirectory.Build.propsglobal.json.vscode/settings.json.gitignore.github/workflows/code-style.yml.github/instructions/csharp.instructions.md
Branding and package identity
- Package ID:
Csharp.DotStyle.Templates - Template short name:
dotnet-governance - Template identity:
Csharp.DotStyle.Templates.DotStyleBaseline - Author / company:
Majdi ZLITNI - License:
MIT
Local test workflow
Install from the source folder first:
dotnet new install ./content/dotnet-governance
Then run a throwaway dry run in a scratch folder:
dotnet new dotnet-governance --dry-run \
--project-name DotStyle.Sample \
--target-framework net10.0 \
--solution-layout "src/, tests/" \
--sdk-version 10.0.100 \
--dotnet-sdk-channel 10.0.x
If the output looks right, generate it for real in a temporary repo and verify that the tokens
in AGENTS.md and global.json are replaced correctly.
Uninstall the folder-based install when you are done:
dotnet new uninstall ./content/dotnet-governance
Package and publish
Pack the template:
dotnet pack -c Release
Install the built package locally and re-test:
dotnet new install ./bin/Release/Csharp.DotStyle.Templates.1.0.0.nupkg
dotnet new list dotnet-governance
Publish to NuGet when ready:
dotnet nuget push bin/Release/*.nupkg \
--source https://api.nuget.org/v3/index.json \
--api-key <your-api-key>
Release checklist
Use this checklist before every release:
- Bump
PackageVersionin DotnetGovernanceTemplates.csproj. - Keep
identityin content/dotnet-governance/.template.config/template.json unchanged unless you are intentionally creating a new template. - Re-run
dotnet pack -c Release. - Reinstall the
.nupkglocally withdotnet new install ./bin/Release/Csharp.DotStyle.Templates.<version>.nupkg. - Re-run the
--dry-rungeneration test. - Confirm the package metadata and README still render correctly on NuGet.
- Push the new package to your feed.
Versioning guidance
- Use semantic versioning for
PackageVersion. - Increase patch versions for doc, metadata, or non-breaking template updates.
- Increase minor versions for new template features or additional generated files.
- Increase major versions when you make breaking changes to the generated output or install flow.
- Keep the template
identitystable so upgrades remain predictable.
Notes on conflicts
If an existing repository already contains files like .editorconfig or .github/workflows/code-style.yml,
dotnet new will report the conflicts. Review the diff first, then use --force only when you want the
template to overwrite the existing files.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 183 | 7/18/2026 |