예제 #1
0
        protected npandaySettingsDefaultSetup GetDefaultSetup(string defaultMonoCLR,
                                                              string installRoot)
        {
            npandaySettingsDefaultSetup defaultSetup = new npandaySettingsDefaultSetup();

            if (installRoot == null)
            {
                defaultSetup.vendorName       = "MONO";
                defaultSetup.vendorVersion    = defaultMonoCLR;
                defaultSetup.frameworkVersion = "2.0.50727";
                return((defaultMonoCLR != null) ? defaultSetup : null);
            }
            bool dirInfo11 = new DirectoryInfo(Path.Combine(installRoot, "v1.1.4322")).Exists;
            bool dirInfo20 = new DirectoryInfo(Path.Combine(installRoot, "v2.0.50727")).Exists;
            bool dirInfo35 = new DirectoryInfo(Path.Combine(installRoot, "v3.5")).Exists;
            bool dirInfo40 = new DirectoryInfo(Path.Combine(installRoot, "v4.0.30319")).Exists;


            if (!dirInfo11 && !dirInfo20 && !dirInfo35 && !dirInfo40)
            {
                return(null);
            }

            defaultSetup.vendorName       = "MICROSOFT";
            defaultSetup.vendorVersion    = (dirInfo20) ? "2.0.50727" : ((dirInfo35) ? "3.5" : ((dirInfo40) ? "4.0" : "1.1.4322"));
            defaultSetup.frameworkVersion = defaultSetup.vendorVersion;
            return(defaultSetup);
        }
예제 #2
0
        protected npandaySettingsDefaultSetup GetDefaultSetup(string defaultMonoCLR,
                                                             string installRoot)
        {
            npandaySettingsDefaultSetup defaultSetup = new npandaySettingsDefaultSetup();
            if (installRoot == null)
            {
                defaultSetup.vendorName = "MONO";
                defaultSetup.vendorVersion = defaultMonoCLR;
                defaultSetup.frameworkVersion = "2.0.50727";
                return (defaultMonoCLR != null) ? defaultSetup : null;
            }
            bool dirInfo11 = new DirectoryInfo(Path.Combine(installRoot, "v1.1.4322")).Exists;
            bool dirInfo20 = new DirectoryInfo(Path.Combine(installRoot, "v2.0.50727")).Exists;
            bool dirInfo35 = new DirectoryInfo(Path.Combine(installRoot, "v3.5")).Exists;
            bool dirInfo40 = new DirectoryInfo(Path.Combine(installRoot, "v4.0.30319")).Exists;

            if (!dirInfo11 && !dirInfo20 && !dirInfo35 && !dirInfo40)
                return null;

            defaultSetup.vendorName = "MICROSOFT";
            defaultSetup.vendorVersion = (dirInfo20) ? "2.0.50727" : ((dirInfo35) ? "3.5" : ((dirInfo40) ? "4.0" : "1.1.4322"));
            defaultSetup.frameworkVersion = defaultSetup.vendorVersion;
            return defaultSetup;
        }