Modify the InstallLocation registry key; core-setup (dotnet/core-setup#5238)
authorJohn Beisner <johnbeisner@users.noreply.github.com>
Sat, 23 Feb 2019 00:48:21 +0000 (16:48 -0800)
committerGitHub <noreply@github.com>
Sat, 23 Feb 2019 00:48:21 +0000 (16:48 -0800)
* Modify the 'InstallLocation' registry key.

Commit migrated from https://github.com/dotnet/core-setup/commit/b344ca9aafbc18e3a75cd5237ff9c1b30aa15987

src/installer/corehost/common/pal.windows.cpp
src/installer/test/HostActivationTests/GivenThatICareAboutMultilevelSDKLookup.cs

index b15c97d..b9c61d5 100644 (file)
@@ -261,7 +261,7 @@ bool get_sdk_self_registered_dir(pal::string_t* recv)
         dotnet_key_path = environmentRegistryPathOverride;
     }
 
-    pal::string_t sub_key = dotnet_key_path + pal::string_t(_X("\\Setup\\InstalledVersions\\")) + get_arch() + pal::string_t(_X("\\sdk"));
+    pal::string_t sub_key = dotnet_key_path + pal::string_t(_X("\\Setup\\InstalledVersions\\")) + get_arch();
     pal::char_t* value = _X("InstallLocation");
 
     // Must use RegOpenKeyEx to be able to specify KEY_WOW64_32KEY to access the 32-bit registry in all cases.
index c5de960..52180e9 100644 (file)
@@ -641,8 +641,8 @@ namespace Microsoft.DotNet.CoreSetup.Test.HostActivation.MultilevelSDKLookup
             try
             {
                 string architecture = fixture.CurrentRid.Split('-')[1];
-                RegistryKey sdkKey = testKey.CreateSubKey($@"Setup\InstalledVersions\{architecture}\sdk");
-                sdkKey.SetValue("InstallLocation", _regDir);
+                RegistryKey dotnetLocationKey = testKey.CreateSubKey($@"Setup\InstalledVersions\{architecture}");
+                dotnetLocationKey.SetValue("InstallLocation", _regDir);
 
                 // Add SDK versions
                 AddAvailableSdkVersions(_regSdkBaseDir, "9999.0.4");