From 4556d8d626981ba04ec085c3b9882ca02411c2a5 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Fri, 22 Feb 2019 16:48:21 -0800 Subject: [PATCH] Modify the InstallLocation registry key; core-setup (dotnet/core-setup#5238) * Modify the 'InstallLocation' registry key. Commit migrated from https://github.com/dotnet/core-setup/commit/b344ca9aafbc18e3a75cd5237ff9c1b30aa15987 --- src/installer/corehost/common/pal.windows.cpp | 2 +- .../HostActivationTests/GivenThatICareAboutMultilevelSDKLookup.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/installer/corehost/common/pal.windows.cpp b/src/installer/corehost/common/pal.windows.cpp index b15c97d..b9c61d5 100644 --- a/src/installer/corehost/common/pal.windows.cpp +++ b/src/installer/corehost/common/pal.windows.cpp @@ -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. diff --git a/src/installer/test/HostActivationTests/GivenThatICareAboutMultilevelSDKLookup.cs b/src/installer/test/HostActivationTests/GivenThatICareAboutMultilevelSDKLookup.cs index c5de960..52180e9 100644 --- a/src/installer/test/HostActivationTests/GivenThatICareAboutMultilevelSDKLookup.cs +++ b/src/installer/test/HostActivationTests/GivenThatICareAboutMultilevelSDKLookup.cs @@ -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"); -- 2.7.4