Repository navigation
Conversation
The outputs of a project are the files it writes. When a project uses files left in its output directories (OutDir, IntermediateOutputPath) by a previous build without writing them, e.g. an incremental build whose targets were up to date, its outputs miss those files, and a cache hit in another clone would not place them. With MSBuildCacheSkipNodesWithLeftoverOutputs (default false), such projects are not added to the cache. Their result is still used by their dependents in the build, so ICacheClient.AddNodeAsync takes a publish flag: the outputs are still hashed to build the node result, which is not added. Existing probes are captured only when the setting is on, whether or not probe and enumeration fingerprinting is enabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Caching a project built over leftover outputs stores outputs without the files it skipped, which a cache hit elsewhere would not place: a correctness fix, so it is on by default. Setting MSBuildCacheSkipNodesWithLeftoverOutputs to false still caches such projects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build summary only counted these nodes, while each one makes its dependents miss in every build. Log the message at high importance, write it to notAdded.txt in the node log directory, and name the other cause: a write by a process whose file accesses are not reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
This was referenced Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes case 1 of #192.
When a project uses files that a previous build left in its output directories without writing them again, its recorded outputs miss those files. The typical case is an incremental build:
CoreCompileis up to date, so the project only readsobj\...\X.dlland copies it tobin. Measured onmainwithtests/TestProject(details in #192):bin\...\TestProject.dll.This change detects such files and doesn't add the node to the cache:
OutDir,IntermediateOutputPath) that the node reads but never writes, and that existed before the node started (existing probes are captured for that, only when the setting is on).ICacheClient.AddNodeAsyncgets apublishflag: the outputs are still hashed to build the node result, which is not stored.Not Added (leftover outputs): N. Each skipped node logs the file it used at high importance, and writes it tonotAdded.txtin its log directory, so the cause can be fixed. The message names the other cause we met: a write by a process whose file accesses are not reported (case 2 of Cache entries are incomplete or never match when a project uses files it was not seen writing #192).MSBuildCacheSkipNodesWithLeftoverOutputs. The second commit makes it on by default, since the alternative stores entries that are incomplete or never match;falserestores today's behavior. Happy to drop that commit and keep it opt-in if you prefer.A clean build (CI from a fresh clone) has nothing left over from a previous build, but it can still read files the plugin didn't see written: without #199 and #200, this check skips WPF projects and projects with satellite assemblies on clean builds too. It matters for local builds that mix incremental builds and caching, and for writes the plugin doesn't see.
Tests:
FileAccessRepositoryTestsandPluginSettingsTestscover the detection and the setting. #199 handles projects outside the graph that write into a node's output directories (WPF), which this check would otherwise count as leftovers.🤖 Generated with Claude Code