[vs18.0] Fix MSB1025 error when using DistributedFileLogger (-dfl flag)#13039
Merged
YuliiaKovalova merged 3 commits intovs18.0from Jan 19, 2026
Merged
[vs18.0] Fix MSB1025 error when using DistributedFileLogger (-dfl flag)#13039YuliiaKovalova merged 3 commits intovs18.0from
YuliiaKovalova merged 3 commits intovs18.0from
Conversation
…logger Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
YuliiaKovalova
approved these changes
Jan 16, 2026
JanProvaznik
approved these changes
Jan 19, 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.
Backport of #13036 to vs18.0
Context
When running
msbuild -dfl(distributed file logger), MSBuild crashes with:PR #12095 introduced a change that passes all
DistributedLoggerRecord.CentralLoggerinstances toProjectCollectionfor evaluation logging. However, the distributed file logger (-dfl) intentionally has a nullCentralLoggerbecause it writes separate log files per node and doesn't need central aggregation.The code now blindly includes these null loggers, which fails the null check in
RegisterLoggerInternal().Changes Made
Filter out null central loggers before passing them to
ProjectCollection:Regression
Yes, this is a regression introduced by PR #12095. The
-dflswitch worked correctly in MSBuild 17.x.Risks
No risks, minimal well-boxed change. The fix simply filters out null values that should never have been passed to the logger registration in the first place.
Testing
msbuild -dflscenariomsbuild -dflon a simple .NET Framework console solutionNotes
The distributed file logger is a valid configuration where
CentralLoggeris null by design - each worker node writes to its own log file independently, so no central aggregation logger is needed.