Fix to not require libc-dev on .NET 5 or later

pull/24485/head
Sean Fausett 4 years ago
parent 384a6f8d51
commit 5c1182ce41
  1. 8
      src/csharp/Grpc.Core/Internal/PlatformApis.cs

@ -49,11 +49,15 @@ namespace Grpc.Core.Internal
static PlatformApis()
{
#if NETSTANDARD1_5 || NETSTANDARD2_0
#if NETSTANDARD
isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
isMacOSX = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
isNetCore = RuntimeInformation.FrameworkDescription.StartsWith(".NET Core");
isNetCore =
#if NETSTANDARD2_0
Environment.Version.Major >= 5 ||
#endif
RuntimeInformation.FrameworkDescription.StartsWith(".NET Core");
#else
var platform = Environment.OSVersion.Platform;

Loading…
Cancel
Save