Esempio n. 1
0
        internal static string GetPathToDotNetFrameworkV30(DotNetFrameworkArchitecture architecture)
        {
            switch (architecture)
            {
            case DotNetFrameworkArchitecture.Current:
                if (pathToCurrentDotNetFrameworkV30 == null)
                {
                    break;
                }
                return(pathToCurrentDotNetFrameworkV30);

            case DotNetFrameworkArchitecture.Bitness32:
                if (pathToDotNetFramework32V30 == null)
                {
                    break;
                }
                return(pathToDotNetFramework32V30);

            case DotNetFrameworkArchitecture.Bitness64:
                if (pathToDotNetFramework64V30 == null)
                {
                    break;
                }
                return(pathToDotNetFramework64V30);

            default:
                ErrorUtilities.ThrowInternalErrorUnreachable();
                return(null);
            }
            if (CheckForFrameworkInstallation(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0\Setup", "InstallSuccess"))
            {
                string str = FindDotNetFrameworkPath(Path.GetDirectoryName(typeof(object).Module.FullyQualifiedName), "v3.0", "v3.0", directoryExists, getDirectories, architecture, true);
                switch (architecture)
                {
                case DotNetFrameworkArchitecture.Current:
                    pathToCurrentDotNetFrameworkV30 = str;
                    return(str);

                case DotNetFrameworkArchitecture.Bitness32:
                    pathToDotNetFramework32V30 = str;
                    return(str);

                case DotNetFrameworkArchitecture.Bitness64:
                    pathToDotNetFramework64V30 = str;
                    return(str);
                }
                ErrorUtilities.ThrowInternalErrorUnreachable();
            }
            return(null);
        }