When I run azd init, I get the following error:
azd init
ERROR: only a single Aspire project is supported at this time
This happens when you try to run azd init from the solution folder.
It will give this error:
You need to change the directory to have the Aspire project which typically has a name convention ending with projectName.AppHost.
Then run it from there it will work.
As you can see in this project example I have taken snapshots of. There are multiple projects, and one project is Aspire which ends with AppHost.
Now I will switch to it cd WeatherApp.AppHost, and run azd init again, it works:
cd WeatherApp.AppHost
I can not defend the reason if this is made on purpose like this or if there is a bug in the command line.
Disclaimer: I have a simple aspire project working with azd command line example, you can check it on GitHub.
This happens when you try to run
azd initfrom the solution folder.It will give this error:
You need to change the directory to have the Aspire project which typically has a name convention ending with projectName.AppHost.
Then run it from there it will work.
As you can see in this project example I have taken snapshots of. There are multiple projects, and one project is Aspire which ends with AppHost.
Now I will switch to it
cd WeatherApp.AppHost, and runazd initagain, it works:I can not defend the reason if this is made on purpose like this or if there is a bug in the command line.