示例#1
0
        private static string GetSharedFolderPath()
        {
            string regValue = string.Empty;

            if (FrameworkVersionDetection.GetRegistryValue(RegistryHive.LocalMachine, SharedFolderPathRegKeyName, SharedFolderPathRegValueName, RegistryValueKind.String, out regValue))
            {
                return(string.Format("{0}{1}", regValue, "DevServer\\9.0"));
            }
            else
            {
                throw new NullReferenceException("Unable to find Windows Shared folder path.");
            }
        }
示例#2
0
        private static string GetMSBuildPath()
        {
            string regValue = string.Empty;

            if (FrameworkVersionDetection.GetRegistryValue(RegistryHive.LocalMachine, Netfx20PathRegKeyName, Netfx20PathRegValueName, RegistryValueKind.String, out regValue))
            {
                Version curVersion = FrameworkVersionDetection.GetExactVersion(FrameworkVersion.Fx20);
                return(string.Format("{0}{1}", regValue, string.Format("v{0}.{1}.{2}", curVersion.Major, curVersion.Minor, curVersion.Build)));
            }
            else
            {
                throw new NullReferenceException("Unable to find .NET Framework Root path.");
            }
        }