dotnet / dotnet/project-system
Upgrading VS can cause projects to appear out-of-date, triggering lots of builds
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
## Steps
1. Enable fast up-to-date check logging
1. Create a .NET project and build it a few times, ensuring the project is up-to-date
1. Close VS
1. Upgrade VS
1. Re-open the project
1. Build the project
## Expected
Project is still up-to-date.
## Actual
Changes to MSBuild in the VS directory cause project(s) to appear out of date.
Logs show:
> FastUpToDate: Input 'C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Microsoft.Common.targets\ImportAfter\Microsoft.LiveUnitTesting.targets' is newer (2024-07-29 09:35:47.859) than earliest output 'C:\\myproject\some-file.cs' (2024-07-26 10:25:17.495), not up-to-date.
## Analysis
We already have code that attempts to exclude certain inputs from the FUTDC based on folder location. These are files that we do not reasonably expect to change, such as files in NuGet packages and files in Program Files. That feature has either regressed, or should be extended to handle this case.
Contributor guide
Assessment
This issue has not been assessed yet.