private static List <string> GetBestStandaloneFrameworks() { int intDotNetVersion = (int)NugetHelper.DotNetVersion(BuildTargetGroup.Standalone); // c //bool using46 = DotNetVersion == ApiCompatibilityLevel.NET_4_6; // NET_4_6 option was added in Unity 5.6 bool using46 = intDotNetVersion == 3; // NET_4_6 = 3 in Unity 5.6 and Unity 2017.1 - use the hard-coded int value to ensure it works in earlier versions of Unity bool usingStandard2 = intDotNetVersion == 6; // using .net standard 2.0 var frameworkGroups = new List <string>(unityFrameworks); if (usingStandard2) { frameworkGroups.AddRange(netStandardFrameworks); } else if (using46) { if (NugetHelper.UnityVersion.Current.Major >= 2018) { frameworkGroups.AddRange(net4Unity2018Frameworks); } if (NugetHelper.UnityVersion.Current.Major >= 2017) { frameworkGroups.AddRange(net4Unity2017Frameworks); } frameworkGroups.AddRange(net3Frameworks); frameworkGroups.AddRange(netStandardFrameworks); } else { frameworkGroups.AddRange(net3Frameworks); } return(frameworkGroups); }