From 0ae25e9ed336e1bf053fa7b03cade644820fd37e Mon Sep 17 00:00:00 2001 From: "gel@microsoft.com" Date: Mon, 18 Oct 2021 16:40:48 -0700 Subject: [PATCH] Fix Core host option --- .../UnitTesting/Api/UnitTestingRemoteHostClient.cs | 2 +- src/Workspaces/Remote/Core/RemoteHostOptions.cs | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Workspaces/Remote/Core/ExternalAccess/UnitTesting/Api/UnitTestingRemoteHostClient.cs b/src/Workspaces/Remote/Core/ExternalAccess/UnitTesting/Api/UnitTestingRemoteHostClient.cs index 6316803a418a5..efb7983953c7c 100644 --- a/src/Workspaces/Remote/Core/ExternalAccess/UnitTesting/Api/UnitTestingRemoteHostClient.cs +++ b/src/Workspaces/Remote/Core/ExternalAccess/UnitTesting/Api/UnitTestingRemoteHostClient.cs @@ -36,7 +36,7 @@ internal UnitTestingRemoteHostClient(ServiceHubRemoteHostClient client, UnitTest public static bool IsServiceHubProcessCoreClr(HostWorkspaceServices services) { var optionServices = services.GetRequiredService(); - return optionServices.GetOption(RemoteHostOptions.OOPCoreClr) || optionServices.GetOption(RemoteHostOptions.OOPCoreClrFeatureFlag); + return optionServices.GetOption(RemoteHostOptions.OOPCoreClrFeatureFlag); } public UnitTestingRemoteServiceConnectionWrapper CreateConnection(object? callbackTarget) where TService : class diff --git a/src/Workspaces/Remote/Core/RemoteHostOptions.cs b/src/Workspaces/Remote/Core/RemoteHostOptions.cs index cc542088b2d90..c7d404a1a4727 100644 --- a/src/Workspaces/Remote/Core/RemoteHostOptions.cs +++ b/src/Workspaces/Remote/Core/RemoteHostOptions.cs @@ -45,20 +45,15 @@ internal sealed class RemoteHostOptions : IOptionProvider new FeatureFlagStorageLocation("Roslyn.OOPServerGC")); // use coreclr host for OOP - public static readonly Option2 OOPCoreClr = new( - FeatureName, nameof(OOPCoreClr), defaultValue: false, - storageLocation: new LocalUserProfileStorageLocation(LocalRegistryPath + nameof(OOPCoreClr))); - public static readonly Option OOPCoreClrFeatureFlag = new( - FeatureName, nameof(OOPCoreClr), defaultValue: false, - new FeatureFlagStorageLocation("Roslyn.OOPCoreClr")); + FeatureName, nameof(OOPCoreClrFeatureFlag), defaultValue: false, + new FeatureFlagStorageLocation("Roslyn.ServiceHubCore")); ImmutableArray IOptionProvider.Options { get; } = ImmutableArray.Create( SolutionChecksumMonitorBackOffTimeSpanInMS, OOP64Bit, OOPServerGC, OOPServerGCFeatureFlag, - OOPCoreClr, OOPCoreClrFeatureFlag); [ImportingConstructor] @@ -77,7 +72,7 @@ public static bool IsUsingServiceHubOutOfProcess(IGlobalOptionService globalOpti => Environment.Is64BitOperatingSystem && globalOptions.GetOption(OOP64Bit); public static bool IsServiceHubProcessCoreClr(IGlobalOptionService globalOptions) - => globalOptions.GetOption(OOPCoreClr) || globalOptions.GetOption(OOPCoreClrFeatureFlag); + => globalOptions.GetOption(OOPCoreClrFeatureFlag); public static bool IsCurrentProcessRunningOnCoreClr() => !RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework") &&