Add API to ProjectInstance that returns set of paths to watch
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
Project system and dotnet-watch need to watch files and directories that might affect evaluation of a project.
Current API `ProjectInstance.ImportPaths` only returns files that are actually imported but not files that do not exist currently and their addition would potentially change project evaluation.
While it is possible to implement such functionality today using [`IDirectoryCache`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.build.filesystem.idirectorycache?view=msbuild-17-netcore) interface, it's non-trivial to do so efficiently. As there is no default implementation of this interface exposed by msbuild, any custom implementation of this interface would need to implement very efficient file system operations (with caching) to avoid perf regression of the build.
### Proposed change
We propose that either a default implementation of this interface is provided, or even better a new API is added to `ProjectInstance` that returns the set of files and directories to watch directly.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.