Skip to content
dotnet-aspire-starter logo

.NET Aspire Starter

dotnet-aspire-starter

Creates production-ready .NET 10 Aspire projects with ASP.NET MVC + Razor + TypeScript frontend, REST API backend, Entity Framework, OpenTelemetry observability, and Polly resilience. Use when asked to create a new .NET web application, scaffold a .NET Aspire project, set up a full-stack .NET sol...

SKILL.md

Full skill instructions

.NET Aspire Starter

Create production-ready .NET 10 Aspire projects with minimal friction. This skill transforms a project idea into a fully configured solution with frontend, backend API, database access, observability, and resilience patterns.

What This Skill Creates

A complete .NET Aspire solution including:

LayerTechnologyPurpose
Orchestrator.NET AspireService orchestration, local development, cloud deployment
FrontendASP.NET MVC + Razor + TypeScript + CSSUser-facing web application
Backend APIASP.NET MVC REST APIBusiness logic and data access
DatabaseEntity Framework CoreORM with code-first migrations
ObservabilityOpenTelemetry + OTLPLogs, metrics, traces (Grafana-ready)
ResiliencePolly.NETCircuit breakers, retries, timeouts
AuthenticationOIDC (prepared)Ready-to-enable identity integration

Quick Start Workflow

User provides: A project idea (e.g., "Build me a task management app")

This skill creates: A complete .NET solution ready for feature development

Step 1: Gather Project Details

Ask the user for:

  1. Project name (e.g., "TaskManager", "InventoryTracker")
  2. Brief description (1-2 sentences)
  3. Target output path (where to create the solution)

Step 2: Run the Scaffold Script

The scaffolder creates a base .NET Aspire project using the official template, then adds skill-specific enhancements (coding standards, AI context, VS Code configuration).

# Run as a C# script directly (no compilation needed)
dotnet run scripts/​ScaffoldAspireProject/​Program.cs -- \
  --name "TaskManager" \
  --description "A task management application for teams" \
  --output "./​projects"

Or build once and reuse the executable:

# Build the scaffolder (first time only)
dotnet build scripts/​ScaffoldAspireProject/​ScaffoldAspireProject.csproj -c Release

# Run the compiled executable
./​scripts/​ScaffoldAspireProject/​bin/​Release/​net10.0/​ScaffoldAspireProject \
  --name "TaskManager" \
  --description "A task management application for teams" \
  --output "./​projects"

Step 3: Initial Configuration

After scaffolding, guide the user through:

  1. Database connection: Update appsettings.json with connection string
  2. Initial entity model: Create the first domain entity in the API project
  3. First migration: Run dotnet ef migrations add Initial

See Initial Setup Guide for detailed steps.

Step 4: Begin Feature Development

The user can now focus on their idea. The boilerplate is complete:

  • Create entities in {ProjectName}.Api/​Models/
  • Add controllers in {ProjectName}.Api/​Controllers/
  • Create views in {ProjectName}.Web/​Views/
  • Write TypeScript in {ProjectName}.Web/​Scripts/

How It Works

The scaffolder in two steps:

  1. Base Project Creation: Runs dotnet new aspire-starter with your project name

    • Creates official Microsoft Aspire project structure
    • Generates AppHost, ServiceDefaults, Api, and Web projects
    • Includes OpenTelemetry and Polly integration
  2. Skill-Specific Enhancements: Adds on top:

    • Coding Standards: .editorconfig and Directory.Build.props with Microsoft C# conventions
    • AI Context: .github/​copilot-instructions.md and docs/​ARCHITECTURE.md for GitHub Copilot/​Claude
    • Developer Experience: VS Code configuration for debugging and build tasks

This approach keeps you aligned with Microsoft's official template while adding production-ready context and standards.


Project Structure

The scaffold creates this structure (plus everything from dotnet new aspire-starter):

{ProjectName}/
├── {ProjectName}.sln
├── {ProjectName}.AppHost/              # Aspire orchestrator (from template)
├── {ProjectName}.ServiceDefaults/      # Shared config (from template)
├── {ProjectName}.Api/                  # REST API backend (from template)
├── {ProjectName}.Web/                  # MVC + Razor frontend (from template)
├── Directory.Build.props                # Our: Microsoft coding standards
├── .editorconfig                        # Our: Code style enforcement
├── .github/
│   └── copilot-instructions.md         # Our: AI coding context
├── .vscode/
│   ├── settings.json                   # Our: VS Code config
│   ├── launch.json                     # Our: Debug configuration
│   └── tasks.json                      # Our: Build tasks
└── docs/
    └── ARCHITECTURE.md                 # Our: Architecture reference

Feature Configuration

OpenTelemetry (Enabled by Default)

Template includes full OpenTelemetry setup. See Telemetry Setup for:

  • Enabling Grafana integration
  • Custom metrics and traces
  • Structured logging patterns
  • Production configuration

Polly Resilience (Enabled by Default)

Template includes Microsoft.Extensions.Http.Resilience with sensible defaults. See Polly Configuration for:

  • Default circuit breaker thresholds
  • Retry policies
  • Timeout configuration
  • Custom resilience strategies

OIDC Authentication (Prepared, Not Enabled)

Authentication scaffolding is in place but commented out. See OIDC Preparation for:

  • Enabling OIDC in frontend and API
  • Shared authentication between layers
  • Token propagation patterns
  • Provider-specific setup (Azure AD, Auth0, Keycloak)

Coding Standards

This skill enforces Microsoft coding standards via:

  • EditorConfig: Consistent formatting across IDEs
  • .NET Analyzers: Enabled with TreatWarningsAsErrors
  • Nullable Reference Types: Enabled by default

See Coding Standards Reference for the complete style guide.


Development Commands

After scaffolding, these commands are available:

# Run the full solution (frontend + API + database)
dotnet run --project {ProjectName}.AppHost

# Run migrations
dotnet ef migrations add {MigrationName} --project {ProjectName}.Api
dotnet ef database update --project {ProjectName}.Api

# Build TypeScript
npm run build --prefix {ProjectName}.Web

# Watch TypeScript during development
npm run watch --prefix {ProjectName}.Web

# Run tests
dotnet test

VS Code & Visual Studio Template Usage

For maximum reuse, this skill can generate templates for direct IDE use.

VS Code Custom Snippets

The scaffold creates .vscode/ configurations including:

  • Launch configurations for debugging
  • Task runners for build/​watch
  • Recommended extensions

Visual Studio Template Export

To create a reusable VS template from the scaffolded project:

dotnet new --install ./​{ProjectName}/ --force

This registers the project as a dotnet new template. See Template Export Guide for multi-project template creation.


Maximizing AI Assistant Effectiveness

The scaffold creates documentation that provides context for AI coding assistants:

GitHub Copilot

The generated .github/​copilot-instructions.md provides:

  • Solution architecture overview
  • Coding patterns used in the project
  • Entity/​controller/​view conventions
  • Testing patterns

Claude / Claude Code

The generated docs/​ARCHITECTURE.md serves as context for:

  • Understanding project structure
  • Following established patterns
  • Maintaining consistency across features

Recommendation: When starting new features, reference these files in your prompts to maintain consistency.


References


Troubleshooting

Script Execution Issues

Missing .NET SDK or old version:

# Check version (need .NET 10.0+)
dotnet --version

# Install from https://dotnet.microsoft.com/​download

dotnet new aspire-starter template not found:

# Update .NET and workload
dotnet workload update
dotnet workload install aspire
dotnet new --list | grep aspire  # Verify installation

Restore dependencies:

cd scripts/​ScaffoldAspireProject
dotnet restore

Build Errors After Scaffold

Missing workload error:

dotnet workload install aspire

TypeScript compilation errors:

cd {ProjectName}.Web && npm install

Database Connection Issues

Ensure the connection string in appsettings.json matches your database. For local development, the scaffold defaults to SQLite.

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View