error executing step command 'provision': failed to set secrets
After running
azd up
and setting die CustomDomain / DefultRedirectUrl deployment starts.
(✓) Done: Resource group: rg-XXXXXXX (3.69s) (✓) Done: Container Registry: XXXXXXX (12.79s) (✓) Done: Log Analytics workspace: law-XXXXXXX (20.373s) (✓) Done: Container Apps Environment: cae-XXXXXXX (1m51.743s) (✓) Done: Storage account: funcstorageaXXXXXXX (25.56s) (✓) Done: Storage account: XXXXXXX (1m19.647s)
and then fails with
ERROR: error executing step command 'provision': failed to set secrets: failed running .NET CLI secret set: exit code: 1, stdout: , stderr: Exit code: 1 Could not load the MSBuild project 'C:\XXXX\src\AppHost\Cloud5mins.ShortenerTools.AppHost.csproj'.
I adapted C:\src\azure.yaml as told in #577
Deploying to West Europe.
Docker is running, all dependencies installed.
Any idea?
Best M
I hame same problem
(✓) Done: Resource group: rg-azUrlShortener-prod (2.565s) (✓) Done: Container Registry: acrqhzo4gg6zveis (8.024s) (✓) Done: Log Analytics workspace: law-qhzo4gg6zveis (23.807s) (✓) Done: Container Apps Environment: cae-qhzo4gg6zveis (2m8.218s) (✓) Done: Storage account: funcstoragea17caqhzo4gg6 (22.799s) (✓) Done: Storage account: urldataqhzo4gg6zveis (25.154s)
ERROR: error executing step command 'provision': failed to set secrets: failed running .NET CLI secret set: exit code: 1, stdout: , stderr: Exit code: 1 Could not load the MSBuild project 'E:\Git\AzUrlShortener\src\AppHost\Cloud5mins.ShortenerTools.AppHost.csproj'.
Problem When trying to provision or build the project Cloud5mins.ShortenerTools.AppHost.csproj, the build failed with the error:
error MSB4236: The SDK 'Aspire.AppHost.Sdk/9.3.0' specified could not be found.
This happened because the .NET Aspire SDK was not installed and the environment only had the Visual Studio Offline Packages feed, without access to nuget.org.
Solution
- Add the official NuGet.org feed
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
- Update workload manifests
dotnet workload update
- Install the Aspire workload
dotnet workload install aspire
Result After enabling the nuget.org feed and installing the Aspire workload, the project built successfully and the provisioning step executed without errors.