Skip to content

TEMPORARY: Overlay custom MSBuild for dotnet/msbuild#12927 investigation - #66003

Closed
ilonatommy wants to merge 40 commits into
dotnet:mainfrom
ilonatommy:msbuild-bootstrap-investigation
Closed

TEMPORARY: Overlay custom MSBuild for dotnet/msbuild#12927 investigation#66003
ilonatommy wants to merge 40 commits into
dotnet:mainfrom
ilonatommy:msbuild-bootstrap-investigation

Conversation

@ilonatommy

@ilonatommy ilonatommy commented Mar 27, 2026

Copy link
Copy Markdown
Member

DO NOT MERGE - Investigation branch only

Purpose

Overlay custom Microsoft.Build.Tasks.Core.dll from the MSBuild team to diagnose intermittent MSB3030: Could not copy file errors during parallel CI builds.

Tracking issue: dotnet/msbuild#12927
Known Build Error: #62807

hits from the known build issue happened on:

Job Step Platform
Test: Ubuntu x64 Run build.sh Linux
Build: Windows x64/x86/arm64 Run build.cmd Windows
Build: Windows x64/x86/arm64 Build Installers Windows
(internal) dotnet-aspnetcore Run build.sh Linux
(internal) dotnet-aspnetcore Build Installers Windows

So it hits both Linux and Windows build legs, specifically during the large parallel compilation steps (Run build.sh, Run build.cmd, Build Installers). These are the jobs where /m parallelism triggers the race condition. Our overlay covers both build.sh and build.ps1, so we're
covered on all the failing legs.

❯ are these legs running on our playground PR?

What this does

  1. Commits a custom Microsoft.Build.Tasks.Core.dll (with extra logging) to eng/msbuild-bootstrap
  2. After SDK initialization in eng/build.sh and eng/build.ps1, overlays the custom DLL onto .dotnet/sdk<version>/Microsoft.Build.Tasks.Core.dll
  3. Prints SHA256 hashes to the build log so we can verify the overlay worked

Expected outcome

  • Build logs will show === MSBuild Bootstrap Overlay ===section confirming the DLL was replaced
  • If the MSB3030 error occurs, the binlog will contain additional diagnostic information from the custom MSBuild
  • The binlog artifact should be shared with the MSBuild team (@OvesN) for analysis

How to revert

Close this PR. No repo-wide changes are needed.

This PR should be updated automatically when my devbox's task scheduler detects that CI finished without error that we're waiting for.

Add custom Microsoft.Build.Tasks.Core.dll from the MSBuild team with
additional logging to diagnose intermittent MSB3030 'Could not copy file'
errors in parallel builds.

The DLL is overlaid onto the SDK's copy in eng/build.sh and eng/build.ps1
after SDK initialization, with SHA256 verification output in the build log.

DO NOT MERGE - investigation branch only.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Mar 27, 2026
ilonatommy and others added 2 commits March 27, 2026 14:59
Windows PowerShell 5.1 (used on CI agents) only supports 2 arguments
to Join-Path. Nest the calls instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The env var may not be set in all CI build configurations. Fall back
to RepoRoot/.dotnet which configure-toolset.ps1 always forces.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ilonatommy ilonatommy added the * NO MERGE * Do not merge this PR as long as this label is present. label Mar 27, 2026
ilonatommy and others added 6 commits March 27, 2026 15:56
Scheduled task script that:
- Checks Build Analysis check run to see if CI is done
- Searches AzDO logs for MSB3030/MSB3026 errors
- If not found, merges upstream/main and retriggers CI
- If found, logs alert and stops

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@ilonatommy

Copy link
Copy Markdown
Member Author

No failures connected with the investigated issue.

@ilonatommy ilonatommy closed this Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework * NO MERGE * Do not merge this PR as long as this label is present.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant