internal static void SetReleaseAndVersionNetFx(Runtime runtime) { if (runtime?.IsNetFx() == true) { var latest = FrameworkInfo.GetLatest(Environment.Version.Major); runtime.Release = latest.Release; runtime.Version = latest.Version?.ToString(); } }
internal static void SetReleaseAndVersionNetFx(Runtime runtime) { if (runtime?.IsNetFx() == true) { var latest = FrameworkInfo.GetLatest(Environment.Version.Major); runtime.FrameworkInstallation = latest; if (latest.Version?.Major < 4) { // prior to 4, user-friendly versions are always 2 digit: 1.0, 1.1, 2.0, 3.0, 3.5 runtime.Version = latest.ServicePack == null ? $"{latest.Version.Major}.{latest.Version.Minor}" : $"{latest.Version.Major}.{latest.Version.Minor} SP {latest.ServicePack}"; } else { runtime.Version = latest.Version?.ToString(); } } }