From 600ece5873a397cac356c52779e3befc085cbecc Mon Sep 17 00:00:00 2001 From: Ladi Prosek Date: Mon, 24 May 2021 14:49:01 +0200 Subject: [PATCH] Don't require IBuildEngine10 in all build engine implementations --- src/Shared/TaskLoggingHelper.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Shared/TaskLoggingHelper.cs b/src/Shared/TaskLoggingHelper.cs index 8b5748932ee..3d12cb49e25 100644 --- a/src/Shared/TaskLoggingHelper.cs +++ b/src/Shared/TaskLoggingHelper.cs @@ -246,7 +246,8 @@ public virtual string GetResourceMessage(string resourceName) /// True if messages of the given importance should be logged, false if it's guaranteed that such messages would be ignored. public bool ShouldLogMessage(MessageImportance importance) { - return importance <= ((IBuildEngine10)BuildEngine).EngineInterface.MinimumRequiredMessageImportance; + return BuildEngine is not IBuildEngine10 buildEngine10 + || importance <= buildEngine10.EngineInterface.MinimumRequiredMessageImportance; } ///