public string GetBestLockFilePath(string packageId, VersionRange versionRange, NuGetFramework framework) { var availableToolVersions = GetAvailableToolVersions(packageId); var bestVersion = versionRange.FindBestMatch(availableToolVersions); return GetLockFilePath(packageId, bestVersion, framework); }
public string GetBestLockFilePath(string packageId, VersionRange versionRange, NuGetFramework framework) { if (versionRange == null) { throw new ArgumentNullException(nameof(versionRange)); } if (framework == null) { throw new ArgumentNullException(nameof(framework)); } var availableToolVersions = GetAvailableToolVersions(packageId); var bestVersion = versionRange.FindBestMatch(availableToolVersions); if (bestVersion == null) { throw new GracefulException($"Version for package `{packageId}` could not be resolved."); } return GetLockFilePath(packageId, bestVersion, framework); }