diff --git a/src/Build/BackEnd/Shared/TargetResult.cs b/src/Build/BackEnd/Shared/TargetResult.cs index 8f7dd4f444e..4969cdb7664 100644 --- a/src/Build/BackEnd/Shared/TargetResult.cs +++ b/src/Build/BackEnd/Shared/TargetResult.cs @@ -54,7 +54,13 @@ public class TargetResult : ITargetResult, ITranslatable /// /// The items produced by the target. /// The overall result for the target. - /// The original build event context from when the target was first built, if available. Can be null. + /// The original build event context from when the target was first built, if available. + /// Non-null when creating a after building the target initially (or skipping due to false condition). + /// Null when the is being created in other scenarios: + /// * Target that never ran because a dependency had an error + /// * in when Cancellation was requested + /// * in ProjectCache.CacheResult.ConstructBuildResult + /// internal TargetResult(TaskItem[] items, WorkUnitResult result, BuildEventContext originalBuildEventContext = null) { ErrorUtilities.VerifyThrowArgumentNull(items, nameof(items));