From: John Beisner Date: Sat, 23 Feb 2019 00:48:21 +0000 (-0800) Subject: Modify the InstallLocation registry key; core-setup (dotnet/core-setup#5238) X-Git-Tag: submit/tizen/20210909.063632~11032^2~373 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4556d8d626981ba04ec085c3b9882ca02411c2a5;p=platform%2Fupstream%2Fdotnet%2Fruntime.git 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 --- 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");