A minimal, batteries-included .NET template for new projects and libraries. Skip the boilerplate — start from a clean, idiomatic scaffold with the house defaults, linting, CI/CD, releases, and agent tooling already wired up.
- Idiomatic scaffold — an
Example.slnxsolution wiring a library project (src/Example) to a matching xUnit test project (tests/Example.Tests). A single documented member with tests shows the house testing pattern;scripts/rename-placeholders.shrepoints theExamplescaffold to your own project name in one shot. - House defaults — every project builds with
Nullable,ImplicitUsings,AnalysisMode=All,EnforceCodeStyleInBuild, XML documentation generation, andTreatWarningsAsErrorsenabled, so code-style and analyzer findings are build errors, not warnings. Editor and analyzer rules live in.editorconfig. - CI/CD — a required-checks workflow on pull requests and the merge queue (
ci.yaml); the .NET build/test validation runs via an org-required reusable workflow enforced by branch rules (rundotnet build/dotnet testlocally before a PR). - Releases & publishing — merge Conventional Commits to
mainand semantic-release cuts av*tag and GitHub release (release.yaml); that tag then publishes the library to NuGet via the sharedpublish-dotnet-libraryworkflow (publish.yaml). - Dependency management — Dependabot keeps dependencies and pinned GitHub Actions current.
- Agent-ready —
AGENTS.mdconventions and a.claude/skills/maintaincard so the autonomous Daily AI Assistant (and any agentic tool) can maintain the repo.
The target framework is declared in the project files — currently net10.0 in src/Example/Example.csproj.
Create a new repository from the template with the GitHub CLI:
gh repo create my-project --template devantler-tech/dotnet-template --public --clone
cd my-projectOr click Use this template on the repository page.
Then make it your own — run the personalisation script to repoint the scaffold (solution, projects, namespaces, and README references) to your project's name in one shot, then replace the sample ExampleClass with your first real type. A clean build and test confirms the scaffold is wired up:
./scripts/rename-placeholders.sh <ProjectName> # e.g. Widget
dotnet build
dotnet testRun the script with no argument to derive a PascalCase name from your origin GitHub remote. It leaves the Use this template links above and the maintenance docs untouched; review the result with git diff. (Prefer to rename by hand? Repoint Example across the .slnx, src/, tests/, and README references yourself.)
dotnet new classlib --output src/<name-of-project>
dotnet sln Example.slnx add src/<name-of-project>dotnet builddotnet testWarnings are treated as errors, so a clean
dotnet buildanddotnet testare required before opening a pull request.
This template is maintained by an autonomous AI assistant. The conventions, validation commands, and contribution workflow live in AGENTS.md.