From cd06045479d8fda1146f15b8c44c239ea00894ad Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Wed, 29 Sep 2021 07:27:35 -0400 Subject: [PATCH] Fix DiscovererHelper condition https://github.com/dotnet/arcade/pull/7965 wasn't quite right as it would be true on full framework --- src/Microsoft.DotNet.XUnitExtensions/src/DiscovererHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.XUnitExtensions/src/DiscovererHelpers.cs b/src/Microsoft.DotNet.XUnitExtensions/src/DiscovererHelpers.cs index 78d7f258eb4..6adc2ba7f36 100644 --- a/src/Microsoft.DotNet.XUnitExtensions/src/DiscovererHelpers.cs +++ b/src/Microsoft.DotNet.XUnitExtensions/src/DiscovererHelpers.cs @@ -14,7 +14,7 @@ internal static class DiscovererHelpers { private static readonly Lazy s_isMonoRuntime = new Lazy(() => Type.GetType("Mono.RuntimeStructs") != null); public static bool IsMonoRuntime => s_isMonoRuntime.Value; - public static bool IsRunningOnNetCoreApp { get; } = (Environment.Version.Major >= 5 || RuntimeInformation.FrameworkDescription.StartsWith(".NET", StringComparison.OrdinalIgnoreCase)); + public static bool IsRunningOnNetCoreApp { get; } = (Environment.Version.Major >= 5 || !RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase)); public static bool IsRunningOnNetFramework { get; } = RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase); public static bool TestPlatformApplies(TestPlatforms platforms) =>