From f001ef0cd05a2b1d63fd017beba5a172844802d1 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 3 Jul 2021 18:17:02 -0400 Subject: [PATCH] Remove unused GetDotNetVersion method --- .../EnvironmentInfo/PlatformInfo.cs | 74 ------------------- 1 file changed, 74 deletions(-) diff --git a/src/NzbDrone.Common/EnvironmentInfo/PlatformInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/PlatformInfo.cs index 3375df2e3..76f323652 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/PlatformInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/PlatformInfo.cs @@ -1,5 +1,4 @@ using System; -using Microsoft.Win32; namespace NzbDrone.Common.EnvironmentInfo { @@ -51,78 +50,5 @@ namespace NzbDrone.Common.EnvironmentInfo { return _version; } - - private static Version GetDotNetVersion() - { - try - { - const string subkey = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\"; - using (var ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(subkey)) - { - if (ndpKey == null) - { - return new Version(4, 0); - } - - var releaseKey = (int)ndpKey.GetValue("Release"); - - if (releaseKey >= 528040) - { - return new Version(4, 8, 0); - } - - if (releaseKey >= 461808) - { - return new Version(4, 7, 2); - } - - if (releaseKey >= 461308) - { - return new Version(4, 7, 1); - } - - if (releaseKey >= 460798) - { - return new Version(4, 7); - } - - if (releaseKey >= 394802) - { - return new Version(4, 6, 2); - } - - if (releaseKey >= 394254) - { - return new Version(4, 6, 1); - } - - if (releaseKey >= 393295) - { - return new Version(4, 6); - } - - if (releaseKey >= 379893) - { - return new Version(4, 5, 2); - } - - if (releaseKey >= 378675) - { - return new Version(4, 5, 1); - } - - if (releaseKey >= 378389) - { - return new Version(4, 5); - } - } - } - catch (Exception ex) - { - Console.WriteLine("Couldnt get .NET framework version: " + ex.ToString()); - } - - return new Version(4, 0); - } } }