diff --git a/src/Build/BackEnd/Components/Logging/LoggingService.cs b/src/Build/BackEnd/Components/Logging/LoggingService.cs index 7f8aa44f50f..eb11739f920 100644 --- a/src/Build/BackEnd/Components/Logging/LoggingService.cs +++ b/src/Build/BackEnd/Components/Logging/LoggingService.cs @@ -514,7 +514,18 @@ public bool IncludeTaskInputs /// public bool IncludeEvaluationPropertiesAndItems { - get => _includeEvaluationPropertiesAndItems ??= _eventSinkDictionary.Values.OfType().Any(sink => sink.IncludeEvaluationPropertiesAndItems); + get + { + if (_includeEvaluationPropertiesAndItems == null) + { + var sinks = _eventSinkDictionary.Values.OfType(); + // .All() on an empty list defaults to true, we want to default to false + _includeEvaluationPropertiesAndItems = sinks.Any() && sinks.All(sink => sink.IncludeEvaluationPropertiesAndItems); + } + + return _includeEvaluationPropertiesAndItems ?? false; + } + set => _includeEvaluationPropertiesAndItems = value; }