{{ message }}
Attempt to fix dotnet restore hang during prepare step#11282
Merged
Conversation
The `dotnet restore` of `package-download.proj` was hanging during the prepare phase, causing all 3 retry attempts to time out after 10 minutes each with zero stdout output. Two issues fixed: 1. Double-quoting of arguments: `ProcessRunner.QuoteArgument()` was called before passing args to the `ProcessRunner` constructor, but the constructor already quotes all arguments via `AddQuotedArgument()`. This caused paths to be wrapped in double quotes (e.g. `"\"/path/to/file\""`), which could cause `dotnet restore` to hang trying to resolve an invalid path. 2. Added `DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true` to the shared pipeline variables so all CI pipelines skip the .NET first-run experience, which can also hang on CI agents. Fixes: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=14008410 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a CI hang during the prepare phase by ensuring dotnet restore is invoked with correctly quoted arguments and by disabling the .NET first-time experience across pipelines. It fits into the xaprepare/automation infrastructure that bootstraps SDK/tooling dependencies reliably in CI.
Changes:
- Stop pre-quoting arguments passed to
ProcessRunnerinStep_InstallDotNetPreview, avoiding double-quoting on the final command line. - Add
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=trueto shared Azure Pipelines variables to reduce the risk of first-run stalls during restore.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
dotnet restore hang during prepare stepdotnet restore hang during prepare step
Member
Author
simonrozsival
approved these changes
May 6, 2026
This was referenced May 8, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Build 14008410 failed during the prepare phase because
dotnet restoreofpackage-download.projtimed out after 10 minutes on all 3 attempts, with zero stdout output — indicating the process was hanging, not just slow.While investigating, we found two things that look wrong and might help:
Double-quoting of arguments:
ProcessRunner.QuoteArgument()was called before passing args to theProcessRunnerconstructor, but the constructor already quotes all arguments viaAddQuotedArgument(). This caused paths to be double-quoted (e.g."\"/path/to/file\"").Missing
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=truein the shared pipeline variables — the first-run experience was triggering on CI (we saw the "Welcome to .NET 11.0!" banner on stderr right before the hang).