Skip to content

Commit

Permalink
Don't require IBuildEngine10 in all build engine implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
ladipro committed May 24, 2021
1 parent 39e991b commit 600ece5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Shared/TaskLoggingHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ public virtual string GetResourceMessage(string resourceName)
/// <returns>True if messages of the given importance should be logged, false if it's guaranteed that such messages would be ignored.</returns>
public bool ShouldLogMessage(MessageImportance importance)
{
return importance <= ((IBuildEngine10)BuildEngine).EngineInterface.MinimumRequiredMessageImportance;
return BuildEngine is not IBuildEngine10 buildEngine10
|| importance <= buildEngine10.EngineInterface.MinimumRequiredMessageImportance;
}

/// <summary>
Expand Down

0 comments on commit 600ece5

Please sign in to comment.