dotnet / dotnet/project-system

Upgrading VS can cause projects to appear out-of-date, triggering lots of builds

Open
#9,515 1 comment 0 reactions 0 assignees View on GitHub
Area-External Feature-Up-to-date Performance-Scenario-Build Tenet-Performance Triage-Approved
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.