Skip to content

Fix stray brace in HandleBuildCancel trace string causing MSB1025#13535

Merged
JanProvaznik merged 2 commits into
mainfrom
copilot/fix-msb1025-format-error
Apr 14, 2026
Merged

Fix stray brace in HandleBuildCancel trace string causing MSB1025#13535
JanProvaznik merged 2 commits into
mainfrom
copilot/fix-msb1025-format-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

  • Identify the bug: stray } in trace format string at OutOfProcServerNode.cs:343
  • Fix the stray } in the HandleBuildCancel trace message
  • Build and verify the fix compiles (0 warnings, 0 errors)
  • Validate bug reproduction: reverted fix, built bootstrap, reproduced exact MSB1025 / FormatException with MSBuildDebugEngine=1 DOTNET_CLI_USE_MSBUILD_SERVER=1 + cancel
  • Validate fix: re-applied fix, rebuilt bootstrap, confirmed clean cancel with no MSB1025 — trace file shows message written successfully
  • Run validation (passed)

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hello @copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo.

Agent-Logs-Url: https://github.com/dotnet/msbuild/sessions/2704aba7-0c9c-4e8d-bead-b176ac45df32

Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix MSB1025 internal failure on build cancel Fix stray brace in HandleBuildCancel trace string causing MSB1025 Apr 13, 2026
Copilot AI requested a review from rainersigwald April 13, 2026 19:48
@rainersigwald rainersigwald marked this pull request as ready for review April 13, 2026 20:23
Copilot AI review requested due to automatic review settings April 13, 2026 20:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a cancellation-path crash in the out-of-proc MSBuild server by correcting an invalid trace format string that could throw a FormatException (surfacing as MSB1025) when tracing is enabled.

Changes:

  • Remove a stray } from the HandleBuildCancel trace message in OutOfProcServerNode, preventing string.Format failures during cancel.

@JanProvaznik JanProvaznik merged commit 20e5760 into main Apr 14, 2026
15 checks passed
@JanProvaznik JanProvaznik deleted the copilot/fix-msb1025-format-error branch April 14, 2026 08:23
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.

Server + MSBuildDebugEngine + cancel = MSB1025

4 participants