Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.

Home Page:https://aka.ms/azd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[AzureTools][Aspire] No error message when executing "azd init" for an Aspire starter project with an existing profile

v-mengwe opened this issue · comments

Clean machine: Win11 x64 23h2 ENU
VS Version: 17.10.0 Preview 8.0 [34908.200.d17.10]
Aspire Version: 8.0.0
Apply NuGet Feeds
azd Version: 1.10.0-beta.1-daily.3772744

REPRO STEPS:

  1. Create an Aspire starter project -> Publish -> Azure Container Apps for .Net Aspire -> Create a new profile.
  2. Right-click solution > Open folder in file explorer -> In the opened folder, right-click any place > open in terminal -> Runing 'azd init'.

Expect:
Output an error message “ERROR: environment already initialized to #profilename”.
image

Actual:
No error message.
image

More Info:

  1. This issue also reproduces for azd 1.9.0.
  2. This issue doesn't reproduce for azd 1.7.0-beta.1-daily. 3519922.

@v-mengwe This is expected behavioral change. VS now initializes the azd project inside the AppHost directory.

The validation step should be changed to:

  1. Right-click solution > Open folder in file explorer -> Change directory to app host directory -> In the opened folder, right-click any place > open in terminal -> Runing 'azd init'.

Which you should get an error.

Hi @v-mengwe. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

Make sense, the error message pops up when running 'azd init' on app host directory. Thanks for the guidance.
image