This repository demonstrates how to set up and run .NET Aspire applications using Visual Studio Code.
-
Install the .NET Aspire workload:
dotnet workload update dotnet workload install aspire
-
Create a new Aspire project:
dotnet new aspire-starter -n MyAspireApp cd MyAspireApp -
Open in VS Code:
code . -
Run in VS Code:
- Press
F5to start debugging - Or use
Ctrl+F5to run without debugging - Choose API or Apphost to run
- The Aspire dashboard will automatically open in your browser
- Set breakpoints in your services for debugging
- Press
MyAspireApp/
├── MyAspireApp.AppHost/ # Orchestration project
├── MyAspireApp.ApiService/ # API service
├── MyAspireApp.Domain/ # Domain lib (Optional)
├── MyAspireApp.Application/ # Application lib (Optional)
├── MyAspireApp.Infrastructure/ # Infrastructure lib (Optional)