A template repository for dotnet applications that leverage GitHub Copilot (or other agents that respect an instructions file).
├── src/ # Application source code and projects
├── tests/ # Test projects (unit tests, integration tests)
├── adrs/ # Architecture Decision Records
├── .github/ # GitHub workflows and AI agent instructions
├── Directory.Build.props # Shared MSBuild properties for all projects
├── Directory.Packages.props # Central Package Management configuration
└── Template.slnx # Solution file
- .NET 10 SDK or later
# Restore dependencies and build all projects
dotnet build
# Build in Release mode
dotnet build -c Release# Run the main application project
dotnet run --project src/YourProjectName/YourProjectName.csproj
# Run with specific environment
dotnet run --project src/YourProjectName/YourProjectName.csproj --environment Production# Run all tests
dotnet test
# Run tests with detailed output
dotnet test --verbosity normal
# Run tests with code coverage
dotnet test --collect:"XPlat Code Coverage"Configuration settings are managed through:
appsettings.json- Default configurationappsettings.{Environment}.json- Environment-specific overrides- Environment variables - Runtime configuration
- User Secrets - Local development secrets (never committed)
This repository follows conventions defined in AGENTS.md, including:
- Central Package Management: All package versions managed in Directory.Packages.props
- Code Style: 2-space indentation, file-scoped namespaces, Allman-style braces
- Testing: xUnit framework with Arrange-Act-Assert pattern
- Warnings as Errors: All compiler warnings must be addressed
Run dotnet format to automatically format code according to project conventions.
- Create a feature branch from
main - Make your changes following the coding conventions
- Ensure all tests pass (
dotnet test) - Submit a pull request