Aspire CLI DNX acquisition failure hard to troubleshoot in CI
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
I have opted my solution into Dnx Pinned for the Aspire CLI Bundle. This works fine locally, but fails in CI (Azure Devops)
1. The error produces a large amount of stdout in Azure Devops. It's information overload and it's really hard to identify what the actual problem is.
2. The error message seems to be unaware of `AspireCliInvocationMode`.
3. The error tells me to run `dnx --yes aspire.cli@13.5.1 -- setup --install-path "C:\Users\AzDevOps\.aspire"` to diagnose the error. This wouldn't be too hard on a local machine, but is a real pain to run in CI. Why can't aspire tell me what the problem is.
The project ran file locally using the CLI, so there's something about the build agent specifically. But the error message is pretty useless about helping me diagnose.
### Expected Behavior
1. The error message should be concise, and easily parseable.
2. The error message seems a bit misleading when I've set `AspireCliInvocationMode`
3. The error message should provide me with more detail in CI to make it easier to troubleshoot.
### Steps To Reproduce
Opt in to aspire dnx acquisition via Directory.Build.props.
```xml
true
DnxPinned
```
Have a CLI acquisition failure in CI.
### Exceptions (if any)
```
Sample.Tests is configured to use the Aspire CLI bundle, but the bundle could not be resolved. New features require the Aspire CLI to be installed. The Aspire dashboard & DCP packages will be deprecated in a future release.
Install the Aspire CLI from https://get.aspire.dev/ and ensure the aspire command is available on PATH, or set AspireCliBundlePath/AspireCliPath to a valid Aspire CLI installation or bundle layout.
Automatic Aspire CLI bundle setup did not produce a usable DCP and dashboard layout.
Automatic Aspire CLI bundle setup failed with exit code 1. Run '"C:\Program Files\dotnet\dotnet.exe" exec "C:\Program Files\dotnet\sdk\10.0.400\dotnet.dll" dnx --yes aspire.cli@13.5.1 -- setup --install-path "C:\Users\AzDevOps\.aspire"' to diagnose the failure.
D:\a\_work\_temp\.nuget\packages\aspire.hosting.apphost\13.5.1\build\Aspire.Hosting.AppHost.targets(433,5): error ASPIRE009: [D:\a\_work\1\s\samples\IntegrationPackage\Sample.Tests\Sample.Tests.csproj]
D:\a\_work\_temp\.nuget\packages\aspire.hosting.apphost\13.5.1\build\Aspire.Hosting.AppHost.targets(433,5): error ASPIRE009: [D:\a\_work\1\s\samples\IntegrationPackage\Sample.Tests\Sample.Tests.csproj]
D:\a\_work\_temp\.nuget\packages\aspire.hosting.apphost\13.5.1\build\Aspire.Hosting.AppHost.targets(433,5): error ASPIRE009: [D:\a\_work\1\s\samples\IntegrationPackage\Sample.Tests\Sample.Tests.csproj]
D:\a\_work\_temp\.nuget\packages\aspire.hosting.apphost\13.5.1\build\Aspire.Hosting.AppHost.targets(433,5): error ASPIRE009: Sample.Tests is configured to use the Aspire CLI bundle, but the bundle could not be resolved. New features require the Aspire CLI to be installed. The Aspire dashboard & DCP packages will be deprecated in a future release. [D:\a\_work\1\s\samples\IntegrationPackage\Sample.Tests\Sample.Tests.csproj]
D:\a\_work\_temp\.nuget\packages\aspire.hosting.apphost\13.5.1\build\Aspire.Hosting.AppHost.targets(433,5): error ASPIRE009: Install the Aspire CLI from https://get.aspire.dev/ and ensure the aspire command is available on PATH, or set AspireCliBundlePath/AspireCliPath to a valid Aspire CLI installation or bundle layout. [D:\a\_work\1\s\samples\IntegrationPackage\Sample.Tests\Sample.Tests.csproj]
D:\a\_work\_temp\.nuget\packages\aspire.hosting.apphost\13.5.1\build\Aspire.Hosting.AppHost.targets(433,5): error ASPIRE009: [D:\a\_work\1\s\samples\IntegrationPackage\Sample.Tests\Sample.Tests.csproj]
D:\a\_work\_temp\.nuget\packages\aspire.hosting.apphost\13.5.1\build\Aspire.Hosting.AppHost.targets(433,5): error ASPIRE009: Automatic Aspire CLI bundle setup did not produce a usable DCP and dashboard layout. [D:\a\_work\1\s\samples\IntegrationPackage\Sample.Tests\Sample.Tests.csproj]
D:\a\_work\_temp\.nuget\packages\aspire.hosting.apphost\13.5.1\build\Aspire.Hosting.AppHost.targets(433,5): error ASPIRE009: [D:\a\_work\1\s\samples\IntegrationPackage\Sample.Tests\Sample.Tests.csproj]
D:\a\_work\_temp\.nuget\packages\aspire.hosting.apphost\13.5.1\build\Aspire.Hosting.AppHost.targets(433,5): error ASPIRE009: Automatic Aspire CLI bundle setup failed with exit code 1. Run '"C:\Program Files\dotnet\dotnet.exe" exec "C:\Program Files\dotnet\sdk\10.0.400\dotnet.dll" dnx --yes aspire.cli@13.5.1 -- setup --install-path "C:\Users\AzDevOps\.aspire"' to diagnose the failure. [D:\a\_work\1\s\samples\IntegrationPackage\Sample.Tests\Sample.Tests.csproj]
D:\a\_work\_temp\.nuget\packages\aspire.hosting.apphost\13.5.1\build\Aspire.Hosting.AppHost.targets(433,5): error ASPIRE009: [D:\a\_work\1\s\samples\IntegrationPackage\Sample.Tests\Sample.Tests.csproj]
##[error]D:\a\_work\_temp\.nuget\packages\aspire.hosting.apphost\13.5.1\build\Aspire.Hosting.AppHost.targets(433,5): Error ASPIRE009:
```
### Aspire doctor output
```plain
N/A - Can't even get aspire cli installed in CI.
```
### Anything else?
For avoidance of doubt, there are two dimensions to this issue
1. Fix the issue I encountered
2. Make it so that CLI acquisition failures are more easily troubleshooted
Contributor guide
Assessment
This issue has not been assessed yet.