From 39a1ce77415d00d89055089d7ef538bd47e16042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Thu, 2 Jun 2022 18:52:41 +0200 Subject: [PATCH] Fix casing --- .../Hosting/DotnetTestHostManager.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs b/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs index 20310de045..0c509e7502 100644 --- a/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs +++ b/src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs @@ -472,19 +472,19 @@ public virtual TestProcessStartInfo GetTestHostProcessStartInfo( if (testHostExeFound) { const string prefix = "VSTEST_WINAPPHOST_"; - const string DOTNET_ROOT = nameof(DOTNET_ROOT); - string vstestDotnetRootEnvName = $"{prefix}{DOTNET_ROOT}(x86)"; + const string dotnetRoot = "DOTNET_ROOT"; + string vstestDotnetRootEnvName = $"{prefix}{dotnetRoot}(x86)"; var vstestDotnetRootEnvValue = _environmentVariableHelper.GetEnvironmentVariable(vstestDotnetRootEnvName); if (vstestDotnetRootEnvValue is null) { - vstestDotnetRootEnvName = $"{prefix}{DOTNET_ROOT}"; + vstestDotnetRootEnvName = $"{prefix}{dotnetRoot}"; vstestDotnetRootEnvValue = _environmentVariableHelper.GetEnvironmentVariable(vstestDotnetRootEnvName); } if (vstestDotnetRootEnvValue != null) { string dotnetRootEnvName = Version.Parse(_targetFramework.Version) >= Version6_0 - ? $"{DOTNET_ROOT}_{_architecture.ToString().ToUpperInvariant()}" + ? $"{dotnetRoot}_{_architecture.ToString().ToUpperInvariant()}" : vstestDotnetRootEnvName.Replace(prefix, string.Empty); EqtTrace.Verbose($"DotnetTestHostmanager.LaunchTestHostAsync: Found '{vstestDotnetRootEnvName}' in env variables, value '{vstestDotnetRootEnvValue}', forwarding to '{dotnetRootEnvName}' (target framework is {_targetFramework.Name}, Version={_targetFramework.Version}).");