From b0fce2b72164e41fb77b3efc2e9f84610402c546 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Sun, 20 Sep 2020 20:03:04 +0200 Subject: [PATCH] (GH-2859) Identify .NET 5 as CoreCLR * fixes #2859 --- src/Cake.Core/Polyfill/EnvironmentHelper.cs | 3 ++- src/Cake.Core/Polyfill/Runtime.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Cake.Core/Polyfill/EnvironmentHelper.cs b/src/Cake.Core/Polyfill/EnvironmentHelper.cs index 67b29a08b5..a5c324c7ea 100644 --- a/src/Cake.Core/Polyfill/EnvironmentHelper.cs +++ b/src/Cake.Core/Polyfill/EnvironmentHelper.cs @@ -92,7 +92,8 @@ public static bool IsCoreClr() #if NETCORE if (_isCoreClr == null) { - _isCoreClr = RuntimeInformation.FrameworkDescription.StartsWith(".NET Core"); + _isCoreClr = RuntimeInformation.FrameworkDescription.StartsWith(".NET Core") + || RuntimeInformation.FrameworkDescription.StartsWith(".NET 5"); } return _isCoreClr.Value; #else diff --git a/src/Cake.Core/Polyfill/Runtime.cs b/src/Cake.Core/Polyfill/Runtime.cs index 92cd4fa7e3..6c6ef260dc 100644 --- a/src/Cake.Core/Polyfill/Runtime.cs +++ b/src/Cake.Core/Polyfill/Runtime.cs @@ -11,7 +11,7 @@ public enum Runtime Clr, /// - /// .NET Core 2. + /// .NET Core / .NET 5. /// CoreClr }