dotnet / dotnet/msbuild

New Feature Idea: Return True if all input files unchanged

Open
#5,175 1 comment 0 reactions 0 assignees View on GitHub
question triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

Is it somewhat feasible to have msbuild tell me if the input files have changed? I am running msbuild in a CI system and it would be ideal to either
1) after running msbuild it would return a value to the CI system if any of the input files had changed. So if Task C depends on Task A and Task B where both A and B have returned "no input files have changed" Task C will be skipped

2) even better I give msbuild the changed files list (from the build pull request) and it returns if it cares about the changed files or not

I am currently looking at using
1) scraping the output log for the "unchanged" and "changed" keywords
2) use the -graphBuild and -preprocess flags then comparing the output to the changed files list

I will try to update this after some more digging

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the issue's proposed approaches: scraping MSBuild output for “unchanged” and “changed” keywords, and using -graphBuild and -preprocess with a changed-files list. Determine which behavior is intended and how MSBuild should report whether inputs changed or matter; the issue does not identify files, tests, or a defined completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.