Prerequisite:
- Install azd command line
- Visual Studio 2022 preview 17.9. and newer
- Visual Studio Code Optional
- Docker Desktop for local development
When you clone the code, open it with Visual Studio 2022 preview 17.9 and newer and set the startup project to WeatherApp.AppHost and fire up.
With the current code, it will start a dashboard.
Follow the steps below:
azd auth login
cd WeatherApp.AppHost
dotnet run --publisher manifest --output-path manifest.json
azd init
What to answer:
-> Use code in the current directory
-> Confirm and continue initializing my app
[X] frontend
[ ] weatherapi
Enter a new environment name: staging-environment
When done successfully
azd up
-> subscription selection -> location wait for provision resources in Azure
azd down
azd config set alpha.infraSynth on
azd infra synth
azd up
azd deploy
Just delete .azure folder, infra folder, azure.yml, and manifest.json
azd config set alpha.infraSynth on
azd infra synth
I have put all commands in line order to start and stop the solution
Before running the following start.ps1
, you need to edit it with your azure subscription id.
From PowerShell:
.\start.ps1
if you need to update the existing resources
.\update.ps1
When finished testing and playing, then clean up:
.\stop.ps1
Snapshot of start.ps1
and stop.ps1
process
https://learn.microsoft.com/en-us/dotnet/aspire/
The repo will be kept updated with new changes from .net Aspire continuous releases and will be as updated as possible.
If you make a nice finding or something that I am not aware of in Aspire, please make a PR to this repo 😊
Note: The background of .net aspire comes from Microsoft Tye 2020, which was a very useful tool, that was turned over time into Aspire