internal static bool IsDotNetFrameworkVersionInstalled(Version requiredVersion) { int num; int num2; int num3; if (FrameworkRegistryInstallation.CanCheckFrameworkInstallation(requiredVersion, out num, out num2, out num3)) { return(FrameworkRegistryInstallation.IsFrameworkInstalled(num, num2, num3)); } return(FileSystemIsDotNetFrameworkVersionInstalled(requiredVersion)); }
/// <summary> /// Check if the given version if the framework is installed /// </summary> /// <param name="version">version to check. /// for .NET Framework 3.5 and any service pack this can be new Version(3,5) or new Version(3, 5, 21022, 8). /// for .NET 3.5 with SP1 this should be new Version(3, 5, 30729, 1). /// For other versions please check the table at http://support.microsoft.com/kb/318785. /// </param> /// <returns></returns> internal static bool IsFrameworkInstalled(Version version) { int minorVersion, majorVersion, minimumSPVersion; if (!FrameworkRegistryInstallation.CanCheckFrameworkInstallation( version, out majorVersion, out minorVersion, out minimumSPVersion)) { return(false); } return(IsFrameworkInstalled(majorVersion, minorVersion, minimumSPVersion)); }