Static graph build hangs when a project references both an outer build and an inner build directly
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
A static graph build hangs during graph construction when one project references both a multi-targeted project's outer build and one of its inner builds directly. A normal build succeeds.
Related to #7432, which reported the same underlying internal error but was closed after it was no longer reproducible.
## Repro
`root.proj`:
```xml
```
`child.proj`:
```xml
TargetFramework
TargetFrameworks
net8.0;net9.0
```
Run:
```bash
dotnet msbuild root.proj /graphBuild /isolateProjects /nr:false /v:minimal
```
## Expected behavior
The graph build completes, or reports an actionable error and exits.
## Actual behavior
The process makes no progress after:
```text
Static graph construction started.
```
The underlying assertion is:
```text
Only transitive references may reference inner builds that got generated by outer builds
```
Reproduced with .NET SDK `11.0.100-preview.7.26360.111` and MSBuild `18.10.0-1.26360.111+50dbab4de`.
A Debug build from current `main` aborts at `Debug.Fail`; setting `MSBUILDDONOTLAUNCHDEBUGGER=1` makes the same build hang, confirming the exception-handling path is responsible for the differing behavior.
*This content was created with assistance from AI.*
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.