Skip to content

[dotnet watch] Replace DotNetWatch.targets with ProjectGraph traversal #40214

Open
@tmat

Description

@tmat

Currently we invoke msbuild to evaluate GenerateWatchList target on the root project, which traverses all project dependencies and collects items that are to be watched. The target can be customized by defining CustomCollectWatchItems target. This is currently done by Razor SDK to collect razor and cshtml files.

This approach seems unnecessarily complex as we already create ProjectGraph and traverse it in some scenarios. We could use the evaluation results from the graph to determine watch file list.

The customization is really not very useful as we need to understand what impact a change in each file has on the compilation. We know what the inputs to C#/VB compilation are (compile items and additional items) so we just need to include all of them.

Related: dotnet/aspnetcore#31217

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions