Skip to content

[release/10.0.4xx] Quote paths with spaces in MSBuild bootstrap InstallDotNetCoreTask - #7076

Closed
lewing wants to merge 2 commits into
release/10.0.4xxfrom
fix/msbuild-bootstrap-path-quoting-10.0.4xx
Closed

lewing wants to merge 2 commits into
release/10.0.4xxfrom
fix/msbuild-bootstrap-path-quoting-10.0.4xx

Conversation

@lewing

@lewing lewing commented Jun 5, 2026

Copy link
Copy Markdown
Member

Cherry-pick of #7075 to release/10.0.4xx to unblock currently-broken Windows builds.

All Windows legs on 10.0.4xx official and PR builds are failing with:
\
Install-scripts was not executed successfully
\\

Root cause: 1ES agents were updated with SDK 10.0.300 system-wide at \C:\Program Files\dotnet, causing \DotNetRoot\ to resolve to a path with spaces. The unquoted path breaks PowerShell's -File\ argument parsing.

See #7075 for full details.

@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team June 5, 2026 12:59
When DotNetRoot resolves to a path with spaces (e.g. C:\Program Files\dotnet\),
the dotnet-install script path and install directory are split on the space
character, causing powershell.exe -File to fail with:

  Processing -File C:\Program failed because the file does not have
  a .ps1 extension.

This quotes scriptPath and InstallDir in the PowerShell and bash argument
strings, and also quotes the chmod argument on Unix.

Same class of fix as #3737.

Co-authored-by: Copilot <[email protected]>
@lewing
lewing force-pushed the fix/msbuild-bootstrap-path-quoting-10.0.4xx branch from d7a33e1 to d7da109 Compare June 5, 2026 13:10
@JanProvaznik

Copy link
Copy Markdown
Member

this is not enough, it'll also fail in sdk; fixing it in our codeflow #7061

@lewing

lewing commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

this is not enough, it'll also fail in sdk; fixing it in our codeflow #7061

every branch is failing

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.

2 participants