Skip to content

Relax flaky assertion in MsbuildRestore_StaticGraphEvaluation_HandlesInvalidProjectFileException (#7555) - #7583

Merged
nkolev92 merged 1 commit into
release/7.9.xfrom
dev-nkolev92-cherrypick-7555-7.9.x
Jul 21, 2026
Merged

nkolev92 merged 1 commit into
release/7.9.xfrom
dev-nkolev92-cherrypick-7555-7.9.x

Conversation

@nkolev92

Copy link
Copy Markdown
Member

Bug

Fixes: N/A (engineering / test-only change)

Description

Cherry-pick of #7555 onto release/7.9.x.

MsbuildRestore_StaticGraphEvaluation_HandlesInvalidProjectFileException is flaky on the release branch: it asserted on the full MSB4025 message including the project path, whose exact shape varies by MSBuild version, so it fails intermittently in CI (observed on the release/7.9.x build for the #7581 merge). This relaxes the assertion to the stable error MSB4025: The project file prefix, which still verifies the invalid-project-file error is surfaced.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
    • Engineering / test-only change — no issue required per the template.
  • Added tests
    • Test-only change; relaxes an assertion in an existing test (came along with the cherry-pick).
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.
    • N/A

…InvalidProjectFileException (#7555)

The test asserted on the full MSB4025 message including the project path, which is not reliably present in the MSBuild restore output and caused intermittent failures. Relax the assertion to match the 'error MSB4025: The project file' prefix instead.

Co-authored-by: Copilot <[email protected]>
(cherry picked from commit 2c9dd86)
@nkolev92
nkolev92 requested a review from a team as a code owner July 21, 2026 20:06
@nkolev92
nkolev92 requested a review from donnie-msft July 21, 2026 20:06
@nkolev92 nkolev92 added the Engineering Changes related to the build infrastructure of the repo and that do not change product code label Jul 21, 2026
@nkolev92
nkolev92 requested a review from Nigusu-Allehu July 21, 2026 20:06
@nkolev92 nkolev92 added the Engineering Changes related to the build infrastructure of the repo and that do not change product code label Jul 21, 2026
@nkolev92
nkolev92 merged commit ab70b09 into release/7.9.x Jul 21, 2026
13 of 18 checks passed
@nkolev92
nkolev92 deleted the dev-nkolev92-cherrypick-7555-7.9.x branch July 21, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Engineering Changes related to the build infrastructure of the repo and that do not change product code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants