Skip to content

[release/10.0.3xx] Quote spaced dotnet paths in bootstrap, sdk overlay, and build-server shutdown - #7080

Merged
JanProvaznik merged 3 commits into
release/10.0.3xxfrom
copilot/bootstrap-path-quoting-10.0.3xx
Jun 5, 2026
Merged

JanProvaznik merged 3 commits into
release/10.0.3xxfrom
copilot/bootstrap-path-quoting-10.0.3xx

Conversation

@JanProvaznik

Copy link
Copy Markdown
Member

Summary

Cherry-picks the three spaced-path quoting fixes from #7061 (release/10.0.4xx) to release/10.0.3xx.

Why 10.0.3xx is affected (and 10.0.1xx is not)

The new windows.vs2026.amd64 agent image (2026.0529) ships SDK 10.0.300 at C:\Program Files\dotnet. When a branch's global.json matches that version, arcade reuses the machine-wide (spaced) install as DOTNET_INSTALL_DIR/DotNetRoot/DotnetTool instead of provisioning the repo-local .dotnet, exposing latent unquoted-path bugs.

Branch global.json SDK Matches image (10.0.300)? Affected
release/10.0.1xx 10.0.108 No No — verified green on the new image (build 2992755, local .dotnet)
release/10.0.3xx 10.0.300 Yes Yes — will break like 10.0.4xx once it lands on a 0529 agent
release/10.0.4xx 10.0.300 Yes Yes (already broken)

10.0.3xx hasn't been bitten yet only because its latest build happened to run on the old (0522) image; the next 0529 agent will hit it.

The three fixes (each a cherry-pick from #7061)

  1. msbuild InstallDotNetCoreTask.cs — quote the dotnet-install script path and install dir; root-preserving trim of a trailing separator so a quoted path ending in \ doesn't escape the closing quote. (PowerShell -File 'C:\Program' parse error.)
  2. sdk OverlaySdkOnLKG.targets — quote $(DotnetTool) --version (cmd C:\Program → exit 9009). Matches dotnet/sdk main.
  3. VMR repo-projects/Directory.Build.targets — quote $(DotNetTool) build-server shutdown (masked by IgnoreExitCode="true", but leaves the compiler server running → CleanupRepo file-lock errors).

Notes

JanProvaznik and others added 3 commits June 5, 2026 16:34
…tCoreTask

Cherry-pick of the fix from #7061 (release/10.0.4xx). When the build SDK
resolves to C:\Program Files\dotnet (arcade reusing the machine-wide install
on the new agent image), the unquoted -File/-InstallDir args broke PowerShell
parsing. Quote the script path and install dir (root-preserving trim of a
trailing separator so a quoted path ending in a backslash does not escape the
closing quote).

Co-authored-by: Copilot <[email protected]>
…path

Cherry-pick from #7061. Unquoted "$(DotnetTool) --version" failed with exit
code 9009 when DotnetTool resolves to C:\Program Files\dotnet\dotnet.exe.
Matches dotnet/sdk main and the other already-quoted $(DotNetTool) Exec calls.

Co-authored-by: Copilot <[email protected]>
Cherry-pick from #7061. The build-server shutdown Exec ran the dotnet path
unquoted; with a spaced build SDK (C:\Program Files\dotnet) cmd parsed
"C:\Program" and printed "is not recognized". IgnoreExitCode="true" masked the
failure, so the compiler server was never shut down, causing "file is being
used by another process" errors during CleanupRepo. Quote the path.

Co-authored-by: Copilot <[email protected]>
@JanProvaznik
JanProvaznik enabled auto-merge (squash) June 5, 2026 14:47
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team June 5, 2026 14:47
@JanProvaznik
JanProvaznik merged commit 2dd7bbe into release/10.0.3xx Jun 5, 2026
8 checks passed
@JanProvaznik
JanProvaznik deleted the copilot/bootstrap-path-quoting-10.0.3xx branch June 5, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants