Skip to content

Commit 90e8b20

Browse files
author
Mirroring
committed
Merge commit '843734df45746db9cbb4d2f5db721ae53f4c959f'
2 parents 9466c71 + 843734d commit 90e8b20

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ public sealed class DotNetMSBuildSdkResolver : SdkResolver
2323
{
2424
public override string Name => "Microsoft.DotNet.MSBuildSdkResolver";
2525

26-
// Default resolver has priority 10000 and we want to go before it and leave room on either side of us.
26+
// Default resolver has priority 10000 and we want to go before it and leave room on either side of us.
2727
public override int Priority => 5000;
2828

2929
private readonly Func<string, string?> _getEnvironmentVariable;
3030
private readonly Func<string>? _getCurrentProcessPath;
3131
private readonly Func<string, string, string?> _getMsbuildRuntime;
3232
private readonly NETCoreSdkResolver _netCoreSdkResolver;
3333

34-
private const string DotnetHost = "DOTNET_HOST_PATH";
34+
private const string DotnetHostExperimentalKey = "DOTNET_EXPERIMENTAL_HOST_PATH";
3535
private const string MSBuildTaskHostRuntimeVersion = "SdkResolverMSBuildTaskHostRuntimeVersion";
3636

3737
private static CachingWorkloadResolver _staticWorkloadResolver = new();
@@ -201,11 +201,11 @@ private sealed class CachedState
201201
if (File.Exists(dotnetExe))
202202
{
203203
propertiesToAdd ??= new Dictionary<string, string?>();
204-
propertiesToAdd.Add(DotnetHost, dotnetExe);
204+
propertiesToAdd.Add(DotnetHostExperimentalKey, dotnetExe);
205205
}
206206
else
207207
{
208-
logger?.LogMessage($"Could not set '{DotnetHost}' because dotnet executable '{dotnetExe}' does not exist.");
208+
logger?.LogMessage($"Could not set '{DotnetHostExperimentalKey}' because dotnet executable '{dotnetExe}' does not exist.");
209209
}
210210

211211
string? runtimeVersion = dotnetRoot != null ?

Diff for: test/Microsoft.DotNet.MSBuildSdkResolver.Tests/GivenAnMSBuildSdkResolver.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
1313
{
1414
public class GivenAnMSBuildSdkResolver : SdkTest
1515
{
16-
private const string DotnetHost = "DOTNET_HOST_PATH";
16+
private const string DotnetHostExperimentalKey = "DOTNET_EXPERIMENTAL_HOST_PATH";
1717
private const string MSBuildTaskHostRuntimeVersion = "SdkResolverMSBuildTaskHostRuntimeVersion";
1818

1919
public GivenAnMSBuildSdkResolver(ITestOutputHelper logger) : base(logger)
@@ -206,7 +206,7 @@ public void ItReturnsHighestSdkAvailableThatIsCompatibleWithMSBuild(bool disallo
206206
{
207207
// DotnetHost is the path to dotnet.exe. Can be only on Windows.
208208
result.PropertiesToAdd.Count.Should().Be(2);
209-
result.PropertiesToAdd.Should().ContainKey(DotnetHost);
209+
result.PropertiesToAdd.Should().ContainKey(DotnetHostExperimentalKey);
210210
}
211211
else
212212
{
@@ -291,7 +291,7 @@ public void ItReturnsHighestSdkAvailableThatIsCompatibleWithMSBuildWhenVersionIn
291291
{
292292
// DotnetHost is the path to dotnet.exe. Can be only on Windows.
293293
result.PropertiesToAdd.Count.Should().Be(4);
294-
result.PropertiesToAdd.Should().ContainKey(DotnetHost);
294+
result.PropertiesToAdd.Should().ContainKey(DotnetHostExperimentalKey);
295295
}
296296
else
297297
{

0 commit comments

Comments
 (0)