src/Misc/EFTools/EntityDesign/VisualStudio/VsUtils.cs
// <summary>
//     Read the Visual Studio Install Dir from the registry.  This should return something like C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\
// </summary>
Read the Visual Studio Install Dir from the registry.
Read the Visual Studio Install Dir from the registry .
internal static string GetVisualStudioInstallDir()
        {
            var installDir = String.Empty;
            var root = GetVisualStudioRegistryPath();
            Debug.Assert(!String.IsNullOrEmpty(root), "The registry path could not be found..");
            if (!String.IsNullOrEmpty(root))
            {
                using (var subKey = Registry.LocalMachine.OpenSubKey(root, false))
                {
                    installDir = subKey.GetValue("InstallDir") as String;
                    Debug.Assert(installDir != null, "Couldn't find registry entry for VisualStudio InstallDir");
                }
            }
            Debug.Assert(new DirectoryInfo(installDir).Exists, "Read VS install dir of " + installDir + " but it doesn't exist!");
            return installDir;
        }
internal static string GetVisualStudioInstallDir ( ) { var installDir = String . Empty ; var root = GetVisualStudioRegistryPath ( ) ; Debug . Assert ( ! String . IsNullOrEmpty ( root ) , " " ) ; if ( ! String . IsNullOrEmpty ( root ) ) { using ( var subKey = Registry . LocalMachine . OpenSubKey ( root , false ) ) { installDir = subKey . GetValue ( " " ) as String ; Debug . Assert ( installDir != null , " " ) ; } } Debug . Assert ( new DirectoryInfo ( installDir ) . Exists , " " + installDir + " " ) ; return installDir ; }
Read the Visual Studio Install Dir from the registry.
Read the Visual Studio Install Dir from the registry .