Don't log named pipe connection failures as errors in BuildServerConnection#82609
Open
Don't log named pipe connection failures as errors in BuildServerConnection#82609
Conversation
When a named pipe connection times out (IOException/TimeoutException), the previous LogException call generated "Error Error: 'IOException' 'The semaphore timeout period has expired.'" which matches a canonical error format, causing MSBuild's Exec task to treat it as a build error. Since connection timeout is a recoverable/transient condition (the caller retries or falls back to command-line), change to a plain logger.Log call that preserves the diagnostic info without the "Error:" prefix. Co-authored-by: jjonescz <3669664+jjonescz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix IOException reporting during Visual Studio build
Don't log named pipe connection timeout as an error
Mar 3, 2026
jjonescz
reviewed
Mar 3, 2026
…nection.cs Same issue: pipe ownership failure and general connect exceptions are also recoverable (both return null → fallback to CLI compiler), so they should not be logged with an "Error:" prefix that could trigger MSBuild's canonical error detection. Co-authored-by: jjonescz <3669664+jjonescz@users.noreply.github.com>
Copilot
AI
changed the title
Don't log named pipe connection timeout as an error
Don't log named pipe connection failures as errors in BuildServerConnection
Mar 3, 2026
jjonescz
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When connecting to the compiler server fails due to a timeout, pipe ownership mismatch, or other exception, the previous
LogException/LogErrorcalls emitted messages prefixed with"Error Error:"or"Error:". This matches the canonical error pattern that MSBuild'sExectask detects in process output, causing it to surface a build error — even though these are transient, recoverable conditions where the compiler falls back gracefully to the command-line tool.Change
In
BuildServerConnection.cs, replaceLogException/LogErrorwith plainLogfor all three recoverable failure paths inTryConnectToServerAsync. Key diagnostic info (exception type + message) is retained; only the"Error:"prefix is dropped.LogException/LogErrorare appropriate for unexpected failures. These connection failures are all handled, recoverable conditions — logging them as errors was misleading.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.