dotnet / project-system

The .NET Project System for Visual Studio
MIT License
968 stars 386 forks source link

Defer joining ProjectBuildRuleSource until solution loaded #9345

Closed drewnoakes closed 10 months ago

drewnoakes commented 10 months ago

During solution load we run evaluations but not DTB. CPS has a feature that detects when the main thread needs DTB results and allows the DTB to run before solution load completes, in order to avoid deadlocks.

While it's fine to create a dataflow subscription for build data during solution load, the joining of upstream data sources can cause CPS to accidentally think that DTB is blocking the UI thread. There's only one gate for the whole solution, so even a single project in this state will cause all projects to build.

In order to avoid this, we defer joining upstream sources until after the solution has loaded.

Microsoft Reviewers: Open in CodeFlow