mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Remove call to PlatformAbstractions
This commit is contained in:
@@ -121,10 +121,10 @@ namespace Jackett.Server.Services
|
|||||||
logger.Error(e, "Error while reading the issue file");
|
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");
|
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);
|
MethodInfo displayName = monotype.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
|
||||||
var monoVersion = "unknown";
|
var monoVersion = "unknown";
|
||||||
|
Reference in New Issue
Block a user