ASP.NET Core MVC + Minimal API template with centralized package management, MSTest testing platform, Playwright E2E tests, and GitHub Actions CI/CD automation
Guide for working with ClaudeStack.net, a .NET 10.0 RC 2 full-stack template demonstrating ASP.NET Core MVC, Minimal APIs, centralized package management, and comprehensive CI/CD automation.
This template includes:
```bash
dotnet build
```
```bash
dotnet build src/ClaudeStack.Web/ClaudeStack.Web.csproj
dotnet build src/ClaudeStack.API/ClaudeStack.API.csproj
```
```bash
dotnet run --project src/ClaudeStack.Web/ClaudeStack.Web.csproj
dotnet run --project src/ClaudeStack.API/ClaudeStack.API.csproj
```
```bash
dotnet test
dotnet run --project tests/ClaudeStack.Web.Tests/ClaudeStack.Web.Tests.csproj
dotnet run --project tests/ClaudeStack.API.Tests/ClaudeStack.API.Tests.csproj
dotnet run --project tests/ClaudeStack.Web.Tests.Playwright/ClaudeStack.Web.Tests.Playwright.csproj
dotnet test --filter FullyQualifiedName~TestMethod1
```
```powershell
pwsh -Command "cd tests/ClaudeStack.Web.Tests.Playwright/bin/Debug/net10.0; ./playwright.ps1 install"
```
Shared MSBuild properties for all projects:
Centralized NuGet Package Management (CPM). All package versions defined here.
**To add a new package:**
1. Add `<PackageVersion Include="PackageName" Version="x.y.z" />` to Directory.Packages.props
2. Add `<PackageReference Include="PackageName" />` (without Version) to project file
Pins .NET SDK version and configures test runner:
```json
{
"sdk": {
"version": "10.0.100-rc.2.25502.107",
"rollForward": "latestFeature"
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
```
Uses **MSTest with Microsoft.Testing.Platform** (not legacy VSTest).
**Required in test project .csproj:**
```xml
<PropertyGroup>
<EnableMSTestRunner>true</EnableMSTestRunner>
<OutputType>Exe</OutputType>
</PropertyGroup>
```
**Tests run with method-level parallelization:**
```csharp
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]
```
**DO NOT use `--test-runner` flag** - it overwrites global.json and removes SDK version config.
```bash
dotnet new mstest -o tests/NewProject --test-runner Microsoft.Testing.Platform
dotnet new mstest -o tests/NewProject
```
**After creating test project, manually add to .csproj:**
```xml
<PropertyGroup>
<EnableMSTestRunner>true</EnableMSTestRunner>
<OutputType>Exe</OutputType>
</PropertyGroup>
```
All C# files must include explicit using statements:
Always reference packages **without Version** in .csproj files:
```xml
<!-- ✅ CORRECT -->
<PackageReference Include="Microsoft.AspNetCore.OpenApi" />
<!-- ❌ WRONG -->
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0" />
```
Every pull request goes through automated validation:
1. **Authorization** - Verifies contributor authorization
2. **PR Guardrails** - Checks description (min 50 chars), size (<2000 lines), template sections
3. **Quality Checks** - Code formatting (`dotnet format --verify-no-changes`), build, tests
4. **Code Review** (Optional) - Claude Code automated review for .NET 10 best practices
5. **Security Review** - GitLeaks, .NET security analyzers, NuGet vulnerability scanner, path security
6. **.NET Validation** - .csproj structure, CPM compliance, global.json validation
Run checks before pushing:
```bash
dotnet format
dotnet build
dotnet test
pwsh -File .github/scripts/check-dotnet-vulnerabilities.ps1
pwsh -File .github/scripts/check-path-security.ps1
pwsh -File .github/scripts/check-csproj-structure.ps1
pwsh -File .github/scripts/check-cpm-compliance.ps1
pwsh -File .github/scripts/check-global-json.ps1
```
**Option 1: GitHub App (Recommended)**
```bash
claude
/install-github-app
```
Or manually: https://github.com/apps/claude
**Option 2: OAuth Token**
```bash
claude auth token
```
Add as `CLAUDE_CODE_OAUTH_TOKEN` secret in repository settings.
Disable all automation in `.github/claude-authorized-users.yml`:
```yaml
emergency:
enabled: true
reason: "Investigating security issue"
```
Automated Docker builds on `main` branch pushes and tagged releases.
**Pull images:**
```bash
docker pull ghcr.io/{owner}/{repo}/claudestack-web:main
docker pull ghcr.io/{owner}/{repo}/claudestack-api:main
docker run -p 8080:8080 ghcr.io/{owner}/{repo}/claudestack-web:main
docker run -p 8080:8080 ghcr.io/{owner}/{repo}/claudestack-api:main
```
**Build locally:**
```bash
docker build -f src/ClaudeStack.Web/Dockerfile -t claudestack-web:local .
docker build -f src/ClaudeStack.API/Dockerfile -t claudestack-api:local .
```
Automated test coverage collection with:
**Setup Codecov:**
Add `CODECOV_TOKEN` secret to repository (get from codecov.io).
Automated publishing on tagged releases (`v*` pattern):
```bash
git tag -a v1.0.0 -m "Release 1.0.0"
git push origin v1.0.0
```
**Destinations:**
**Running on WSL2 (Ubuntu)** - all hooks and scripts use Linux/bash conventions.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/net-10-full-stack-template/raw