Skip to content

Commit

Permalink
(GH-2859) Identify .NET 5 as CoreCLR
Browse files Browse the repository at this point in the history
* fixes #2859
  • Loading branch information
devlead committed Sep 20, 2020
1 parent 439ac27 commit b0fce2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Cake.Core/Polyfill/EnvironmentHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Cake.Core/Polyfill/Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public enum Runtime
Clr,

/// <summary>
/// .NET Core 2.
/// .NET Core / .NET 5.
/// </summary>
CoreClr
}
Expand Down

0 comments on commit b0fce2b

Please sign in to comment.