private static void SetBridgeVsAssemblyVersion(string vsVersion) { using (RegistryKey key = Registry.CurrentUser.CreateSubKey(CommonRegistryConfigurations.GetRegistryKey(Resources.ProductVersion, vsVersion))) { key?.SetValue(VersionRegistryValue, CurrentAssemblyVersion); } }
private static string GetInstallationFolder(string vsVersion) { //Set in the registry the installer location if it is has changed using (RegistryKey key = Registry.CurrentUser.OpenSubKey(CommonRegistryConfigurations.GetRegistryKey(Resources.ProductRegistryKey, vsVersion))) { object value = key?.GetValue(InstallFolderPathRegistryValue); return(value?.ToString()); } }
private static string InstalledExtensionVersion(string vsVersion) { using (RegistryKey key = Registry.CurrentUser.OpenSubKey(CommonRegistryConfigurations.GetRegistryKey(Resources.ProductVersion, vsVersion))) { if (key == null) { return(string.Empty); } object value = key.GetValue(VersionRegistryValue); if (value != null) { return(value.ToString()); } } return(string.Empty); }
private static void SetInstallationFolder(string vsVersion) { //Set in the registry the installer location if it is has changed using (RegistryKey key = Registry.CurrentUser.CreateSubKey(CommonRegistryConfigurations.GetRegistryKey(Resources.ProductRegistryKey, vsVersion))) { if (key == null) { return; } object value = key.GetValue(InstallFolderPathRegistryValue); if (value != null && value.Equals(CommonFolderPaths.InstallFolder)) { return; } key.SetValue(InstallFolderPathRegistryValue, CommonFolderPaths.InstallFolder); } }