C# / .NET project template for XeplosionGames. Managed via .forgejo — do not push directly.
- Shell 100%
| .forgejo | ||
| ISSUE_TEMPLATE | ||
| scripts | ||
| src | ||
| tests | ||
| .editorconfig | ||
| .gitignore | ||
| pull_request_template.md | ||
| README.md | ||
| xegames.config.yml | ||
template-dotnet
Template for XeplosionGames .NET / C# projects. Use this for games, tools, libraries, and any C# codebase.
Creating a repo from this template
- Click Use this template on Forgejo
- Delete the
src/andtests/placeholder directories - Create your solution:
dotnet new sln -n YourProject - Add your projects under the solution
- Follow the setup checklist below
Setup checklist
- Set
RELEASE_TOKENsecret in Settings → Secrets - Delete
src/.gitkeepandtests/.gitkeep - Create your
.slnxsolution file - Add your project(s) to the solution
- Add your test project and reference it in the solution
- Run
create-project.shfromXeplosionGames/.forgejoto seed project board - Push to
mainand verify CI passes
Code style
This repo uses dotnet format for style enforcement, configured via .editorconfig.
To check formatting locally:
dotnet format --verify-no-changes
To fix formatting locally:
dotnet format
Conventions
| Rule | Value |
|---|---|
| Indentation | 4 spaces |
| Line endings | LF |
| Braces | Allman style (opening brace on new line) |
| Private fields | camelCase |
| Properties | PascalCase (standard .NET) |
| Braces on single-line blocks | Required (csharp_prefer_braces = true) |
Testing
Tests live in a dedicated MSTest project. The CI workflow discovers and runs
all test projects automatically via dotnet test.
To run tests locally:
dotnet test --configuration Release
Solution structure
Recommended project layout: YourProject.slnx ├── YourProject/ main project ├── YourProject.Common/ shared models, utilities ├── YourProject.Tests.MSTest/ unit tests └── YourProject.DevelopmentTools/ editors, tools (optional)
Workflows
| Workflow | Trigger | Purpose |
|---|---|---|
ci-dotnet.yml |
Every push / PR | Format check + build + MSTest |
release.yml |
Tag push v* |
Generate release notes + attach build artifacts |
Branch structure
| Branch | Purpose |
|---|---|
main |
Production-ready, triggers release on tag |
dev |
Active development |
feature/* |
Short-lived feature branches, PR to dev |
hotfix/* |
Urgent fixes off main, PR to both main and dev |
Commit convention
All commits use Conventional Commits format with a trailing period: : .
| Type | Use for |
|---|---|
feat: |
New functionality |
fix: |
Bug fixes |
chore: |
Dependencies, tooling, refactors |
docs: |
Documentation only |
ci: |
CI/CD workflow changes |
perf: |
Performance improvements |
test: |
Adding or updating tests |
style: |
Formatting only, no logic change |