Skip to content

devantler-tech/dotnet-template

.NET Template

License

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.

✨ What's included

  • Idiomatic scaffold — an Example.slnx solution 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 — rename Example to your own name and replace the example with your first type.
  • House defaults — every project builds with Nullable, ImplicitUsings, AnalysisMode=All, EnforceCodeStyleInBuild, XML documentation generation, and TreatWarningsAsErrors enabled, 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 (run dotnet build / dotnet test locally before a PR).
  • Releases & publishing — merge Conventional Commits to main and semantic-release cuts a v* tag and GitHub release (release.yaml); that tag then publishes the library to NuGet via the shared publish-dotnet-library workflow (publish.yaml).
  • Dependency managementDependabot and Renovate keep dependencies and pinned GitHub Actions current.
  • Agent-readyAGENTS.md conventions and a .claude/skills/maintain card 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.

🚀 Use this template

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-project

Or click Use this template on the repository page.

Then make it your own — rename the solution, library project, namespace, and test project from Example to your project's name, and replace ExampleClass with your first type. A clean build and test confirms the scaffold is wired up:

dotnet build
dotnet test

📝 Usage

Add a project to the solution

dotnet new classlib --output src/<name-of-project>
dotnet sln Example.slnx add src/<name-of-project>

Build your solution

dotnet build

Test your solution

dotnet test

Warnings are treated as errors, so a clean dotnet build and dotnet test are required before opening a pull request.

🤖 Maintenance

This template is maintained by an autonomous AI assistant. The conventions, validation commands, and contribution workflow live in AGENTS.md.

About

A simple .NET template for new projects.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages