Serialization of Targets when awaiting for a single target
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 133
Description
### Issue Description
An behavior when building a "Fast" and "Slow" target, when a project reference for "Fast" target, the build waits for both "Fast" and "Slow" to finish. This blocks P2P from continuing when "Fast" is done.

With a bad workaround,

### Steps to Reproduce
Attached binlog with projects. [BuildWorkers.zip](https://github.com/dotnet/msbuild/files/9273865/BuildWorkers.zip)
msbuild.exe /m Solution.proj
### Expected Behavior
I expect "Slow" targets from both worker projects to run in parallel. The "fast" target will stagger because of the project dependency.
### Actual Behavior
I see that Worker1.proj runs "Fast+Slow" targets, then Worker2.proj "Fast+Slow" in serialization.
### Analysis
No Idea.
### Versions & Configurations
Repros in VS2022 and VS2019, probably even earlier.
Contributor guide
No contributing guide indexed for this repository
Research direction
Unpack BuildWorkers.zip and run msbuild.exe /m Solution.proj to reproduce the scheduling behavior across Solution.proj, Worker1.proj, and Worker2.proj. Compare the expected parallel Slow targets and staggered Fast targets with the serialized actual behavior, then use the binlog to trace where target waiting is introduced. Done means the Fast project reference no longer blocks unrelated Slow targets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100