Remove call to PlatformAbstractions

This commit is contained in:
flightlevel
2018-06-24 12:00:59 +10:00
parent 54c5b66ecf
commit 4970219ea7

View File

@@ -121,10 +121,10 @@ namespace Jackett.Server.Services
logger.Error(e, "Error while reading the issue file");
}
Version dotNetVersion = Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default.Application.RuntimeFramework.Version;
bool runningOnDotNetCore = RuntimeInformation.FrameworkDescription.IndexOf("Core", StringComparison.OrdinalIgnoreCase) >= 0;
Type monotype = Type.GetType("Mono.Runtime");
if (monotype != null && dotNetVersion.Major > 3)
if (monotype != null && !runningOnDotNetCore)
{
MethodInfo displayName = monotype.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
var monoVersion = "unknown";