Repository navigation
Description
Describe the bug
On Linux x64 CI, an Aspire 17.0.0 AppHost configured with AspireCliInvocationMode=DnxPinned fails to build on a clean agent when dotnet is on PATH but the standalone dnx shim is not. The SDK selects DNX mode but never starts DNX to acquire the pinned CLI or prepare the bundle.
Diagnostics
The build reports ASPIRE009 (the Aspire CLI bundle could not be resolved) and suggests installing the Aspire CLI or setting an explicit CLI or bundle path. It doesn't say that it couldn't find dnx. In the diagnostic binlog, the only clue we found was an empty dnx: field:
Aspire CLI invocation selection: Dnx (aspire: , dnx: )
That makes it hard to distinguish a missing launcher from an aspire.cli restore failure. ASPIRE011 describes the missing command clearly, but is emitted during run preflight, not during the build that failed here. If no usable DNX launcher can be resolved during bundle acquisition, please include that fact in the build error and binlog.
Steps to reproduce
-
On a clean Linux x64 agent, extract the SDK archives into
/usr/share/dotnetand symlink onlydotnetinto a directory onPATH. This is equivalent to our CI image setup:for channel in 10.0 11.0; do version=$(wget -qO- "https://builds.dotnet.microsoft.com/dotnet/Sdk/$channel/latest.version") archive="dotnet-sdk-$version-linux-x64.tar.gz" wget -q "https://builds.dotnet.microsoft.com/dotnet/Sdk/$version/$archive" tar -C /usr/share/dotnet -xzf "$archive" rm "$archive" done ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet echo 'DOTNET_ROOT=/usr/share/dotnet' >> /etc/environment
Leave
/usr/share/dotnetoffPATHand don't symlinkdnx.command -v dotnetshould succeed andcommand -v dnxshould not. The shim may be present in the SDK installation; the issue is that it's not onPATH. -
With no existing Aspire CLI bundle, set
<AspireCliInvocationMode>DnxPinned</AspireCliInvocationMode>on an Aspire 17.0.0 AppHost and rundotnet build -bl. The failing CI run selected SDK 10.0.404 and targetednet10.0.
Expected behavior
When the selected .NET SDK supports DNX, Aspire should be able to acquire the pinned CLI through the dotnet host without requiring the standalone shim on PATH. For example, fall back to dotnet dnx --yes aspire.cli@17.0.0 -- setup … when the shim can't be resolved. This would preserve the shim's existing SDK-selection behavior when it is available.
Workaround
Our Linux CI build passed after selecting the .NET 11 SDK and adding the following to Directory.Build.targets; the AppHost still targets net10.0. This uses internal Aspire targets and properties, so it is a workaround, not a supported extension point.
<Project>
<!-- Aspire's resolver discovers the dnx shim; fall back to the SDK host when only dotnet is exposed. -->
<Target Name="UseDotnetDnxWhenDnxShimIsUnavailable"
AfterTargets="_ResolveAspireCliInvocation"
Condition="'$(IsAspireHost)' == 'true'
and '$(AspireUseCliBundle)' == 'true'
and '$(AspireCliPath)' == ''
and '$(_AspireResolvedCliInvocationMode)' == 'Dnx'
and '$(_AspireResolvedDnxPath)' == ''
and '$(DOTNET_HOST_PATH)' != ''
and Exists('$(DOTNET_HOST_PATH)')">
<PropertyGroup>
<_AspireResolvedDnxPath>$(DOTNET_HOST_PATH)</_AspireResolvedDnxPath>
<_AspireResolvedDnxHostPath>$(DOTNET_HOST_PATH)</_AspireResolvedDnxHostPath>
<_AspireResolvedDnxHostArguments>dnx</_AspireResolvedDnxHostArguments>
<_AspireResolvedDnxHostArgumentsPrefix>dnx </_AspireResolvedDnxHostArgumentsPrefix>
</PropertyGroup>
<ItemGroup>
<_AspireResolvedDnxHostArgument Remove="@(_AspireResolvedDnxHostArgument)" />
<_AspireResolvedDnxHostArgument Include="dnx" />
</ItemGroup>
<Message Text="The dnx shim was not found on PATH; using '$(DOTNET_HOST_PATH) dnx' instead." Importance="Low" />
</Target>
</Project>
Activity
joperezr commentedon Nov 19, 2026
🤖 Aspire triage pass — 2026-11-19 21:35 UTC
Area:
area-cliKind: bug
Repro: yes-minimal — see lines 17–32 of the issue body; reported steps, not independently executed
Affected version(s):
17.0.0(last working: not established; latest: 17.0.0); SDK version reported in line 32Severity: S3 — clean Linux CI builds fail with a restricted launcher search path; a workaround is reported in lines 40–67, with additional SDK requirements
Urgency: ⚪ backlog — no milestone
Reason: no confirmed regression baseline or evidence of broad impact; the configured release context is stale, and expected milestone 13.6 is not open. No substitute milestone was selected.
Suggested owner(s): David Fowler (@davidfowl) (score 222; provisional, availability not verified)
Evidence:
area-cliin the sampled last-90-day stream, all within 30 days: Give dotnet run apphost.cs the aspire run startup budget in SingleFileAppHostInit E2E test #21967, Fix flaky ComputeRunArgumentsPopulatesRunPropertiesForSdkProject (MSBuild server fallback notice on stderr) #21955, Fix RepositoryTemplate_ResolvesRefsAndReusesPinnedCheckoutsAcrossInvocations timeout on slow Git checkouts #21952, Serve NuGet search paging test from memory to unblock macOS CLI CI #21832, Pin public npm registry for Dependabot in template and JsPublish lockfile directories #21660, Fix K8s PV E2E race waiting for recreated StatefulSet pod #21654, Capture CLI diagnostics when an E2E command hangs #21651, Don't discard completed process output when the thread pool is backlogged after exit #21626, Make EnvironmentChecker timeout tests deterministic with TimeProvider #21618, Gate JavaScript runtime CLI E2E checks on AppHost readiness #21617, Ignore just-published npm releases in Docker CLI E2E shells #21615, Treat backchannel close during RequestStopAsync as a completed stop #21602, Fix flaky NuGetPackagePrefetcher cancellation logging test #21599, Warn when AspireCliPath overrides a DNX AspireCliInvocationMode #21592, Fix StopNonInteractiveTests launch-port collision between generated AppHosts #21583, Only show 'Stopping Aspire' when canceling aspire run #21561, Keep captured output when ProcessCaptureRunner's post-exit drain bound expires #21556, Avoid Add-Type compile in detached Windows null-stdin CLI test #21549, Clean up stranded telemetry hook temp files and name the script on failure #21508, Fix flaky ComputeRunArgumentsPopulatesRunPropertiesForSdkProject (NuGet audit warning on stderr) #21502, Fix CLI telemetry persistence tests racing the exporter's eager storage drain #21499, Use a version-specific CLI bundle for pinned DNX AppHost invocations #21473, Stop dotnet CLI from exporting its own OTLP telemetry for project resources #21454, Build the CLI before MCP initialization in McpDocsE2ETests #21450.Confidence: medium
Needs human?: yes — expected milestone 13.6 is not open; release-train configuration and suggested owner's availability require confirmation