Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public sealed class NuGetSdkResolver : SdkResolver
{
private static readonly Lazy<bool> DisableNuGetSdkResolver = new Lazy<bool>(() => Environment.GetEnvironmentVariable("MSBUILDDISABLENUGETSDKRESOLVER") == "1");

private static readonly Lazy<object> SettingsLoadContext = new Lazy<object>(() => new SettingsLoadingContext());

private static readonly Lazy<object> MachineWideSettings = new Lazy<object>(() => new XPlatMachineWideSetting());

private readonly IGlobalJsonReader _globalJsonReader;

/// <summary>
Expand Down Expand Up @@ -127,7 +131,7 @@ public static SdkResult GetSdkResult(SdkReference sdk, object nuGetVersion, SdkR
var parsedSdkVersion = (NuGetVersion)nuGetVersion;

// Load NuGet settings and a path resolver
ISettings settings = Settings.LoadDefaultSettings(context.ProjectFilePath);
ISettings settings = Settings.LoadDefaultSettings(context.ProjectFilePath, configFileName: null, MachineWideSettings.Value as IMachineWideSettings, SettingsLoadContext.Value as SettingsLoadingContext);

var fallbackPackagePathResolver = new FallbackPackagePathResolver(NuGetPathContext.Create(settings));

Expand Down