Closed ellismg closed 3 weeks ago
Wrote this based on your excellent writeup in #4513, @vhvb1989. I'll get a fresh dev-box and exercise the scenario we suspected here.
I think what we need is DOTNET_SKIP_FIRST_TIME_EXPERIENCE
( see: https://learn.microsoft.com/dotnet/core/tools/dotnet-environment-variables#dotnet_skip_first_time_experience).
Just read it all and saw DOTNET_NOLOGO is what we want
I'll get a fresh dev-box and exercise the scenario we suspected here.
Yup - I was able to reproduce this by setting up fresh dev boxes, installing RC2 of .NET 9.0 and then running azd init --from-code
in a fresh clone of eShop. With this change, the app is now correctly detected as an Aspire project.
May elevate using
sudo
on some platforms and configurations
bash:
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4515/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4515/install-azd.sh | bash -s -- --base-url https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4515 --version '' --verbose --skip-verify
pwsh:
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4515/uninstall-azd.ps1' -OutFile uninstall-azd.ps1; ./uninstall-azd.ps1
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4515/install-azd.ps1' -OutFile install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4515' -Version '' -SkipVerify -Verbose
PowerShell install
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4515/uninstall-azd.ps1' > uninstall-azd.ps1; ./uninstall-azd.ps1;"
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4515/install-azd.ps1' > install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4515' -Version '' -SkipVerify -Verbose;"
MSI install
powershell -c "irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/4515/azd-windows-amd64.msi' -OutFile azd-windows-amd64.msi; msiexec /i azd-windows-amd64.msi /qn"
Per https://learn.microsoft.com/dotnet/core/tools/dotnet-environment-variables#dotnet_nologo:
Since there are cases where we interpret the output of the
dotnet
CLI (for example, when callingdotnet msbuild --getProperty:IsAspireHost
) we should set this value to ensure that this message is not printed, which would break our deserialization logic, which expects just JSON data to be printed to stdout.Fixes #4513