Create your first app
Bu içerik henüz dilinizde mevcut değil.
Aspire provides templates and tooling to quickly create and configure cloud-native apps in Visual Studio, VS Code, or the CLI. Prefer not to install anything locally? Start your first app in a Dev Container:
Alternatively, assuming you have the prerequisites and Aspire CLI installed, you can create a new Aspire solution.
-
Create a new Aspire solution:
Create a new aspire solution aspire new aspire-starter -n AspireApp -o AspireAppIf prompted for additional selections, use the
Up Arrow ↑ Up Arrow ↑ Up Arrow ↑ andDown Arrow ↓ Down Arrow ↓ Down Arrow ↓ keys to navigate the options. PressReturn Return Enter Enter Enter Enter to confirm your selection.For further CLI reference, see
aspire newcommand information. -
Verify the solution was created successfully. The Aspire CLI creates a new folder named AspireApp in the current directory. This folder contains the solution file and several projects, including:
- AspireApp.sln
DizinAspireApp.ApiService
DizinProperties/
- …
- appsettings.Development.json
- appsettings.json
- AspireApp.ApiService.csproj
- Program.cs
DizinAspireApp.AppHost this is your local dev-time orchestrator
DizinProperties/
- …
- appsettings.Development.json
- appsettings.json
- AspireApp.AppHost.csproj
- AppHost.cs
DizinAspireApp.ServiceDefaults
- Extensions.cs
- AspireApp.ServiceDefaults.csproj
DizinAspireApp.Web
DizinProperties/
- …
Dizinwwwroot/
- …
- appsettings.Development.json
- appsettings.json
- AspireApp.Web.csproj
- Program.cs
- WeatherApiClient.cs
This solution structure is based on the Aspire templates. If they’re not installed already, the CLI will install them for you.
-
Change to the output directory:
Change directories—stepping into the output directory cd ./AspireApp -
Run the Aspire AppHost project:
Run dev-time orchestration aspire runWhen you run this command, the Aspire CLI automatically finds the AppHost project, builds your solution, and launches dev-time orchestration. Once the dashboard is ready, its URL (with a login token) appears in your console. You’ll also see a live, real-time view of your running resources and their current states.
Example output of aspire run Dashboard: https://localhost:17244/login?t=9db79f2885dae24ee06c6ef10290b8b2Logs: /home/vscode/.aspire/cli/logs/apphost-5932-2025-08-25-18-37-31.logPress CTRL+C to stop the apphost and exit.For further CLI reference, see
aspire runcommand information. -
Explore the running distributed application. From the dashboard, open the
HTTPSendpoint from each resource.
-
Stop the AppHost and close the dashboard by pressing
⌘+C ⌘+C Control + C CtrlC Control + C CtrlC .🥳 Congratulations! You’ve created your first Aspire app.
Next steps
Section titled “Next steps”Next, deepen your understanding of Aspire by learning how the AppHost defines your application’s architecture, and how deployment and app topology are defined once and reused across environments.