From 55be91a2ae8cdb2cc3e92efe5f0677403a4c01b6 Mon Sep 17 00:00:00 2001 From: Sergey Tregub Date: Fri, 17 Feb 2017 16:59:02 +0300 Subject: [PATCH] fix #2138 --- src/Paket.Core/NuGetV2.fs | 2 +- src/Paket.Core/NuGetV3.fs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Paket.Core/NuGetV2.fs b/src/Paket.Core/NuGetV2.fs index 577ca33b84..ef1e661524 100644 --- a/src/Paket.Core/NuGetV2.fs +++ b/src/Paket.Core/NuGetV2.fs @@ -644,7 +644,7 @@ let rec private getPackageDetails root force (sources:PackageSource list) packag return Some(source,result) } let tryV3 source nugetSource = async { - if nugetSource.Url.Contains("myget.org") || nugetSource.Url.Contains("nuget.org") || nugetSource.Url.Contains("visualstudio.com") then + if nugetSource.Url.Contains("myget.org") || nugetSource.Url.Contains("nuget.org") || nugetSource.Url.Contains("visualstudio.com") || nugetSource.Url.Contains("/nuget/v3/") then match NuGetV3.calculateNuGet2Path nugetSource.Url with | Some url -> let! result = diff --git a/src/Paket.Core/NuGetV3.fs b/src/Paket.Core/NuGetV3.fs index f0cb7fa7d3..5798ba9381 100644 --- a/src/Paket.Core/NuGetV3.fs +++ b/src/Paket.Core/NuGetV3.fs @@ -54,6 +54,7 @@ let calculateNuGet2Path(nugetUrl:string) = | "http://api.nuget.org/v3/index.json" -> Some "http://www.nuget.org/api/v2" | "https://api.nuget.org/v3/index.json" -> Some "https://www.nuget.org/api/v2" | url when url.EndsWith("/nuget/v3/index.json") && url.Contains("pkgs.visualstudio.com") -> Some (url.Replace("/nuget/v3/index.json","/nuget/v2")) + | url when url.EndsWith("/nuget/v3/index.json") -> Some (url.Replace("/nuget/v3/index.json","/nuget/v2")) // For on-premise TFS we don't know host as for VSTS | url when url.EndsWith("/api/v3/index.json") && url.Contains("visualstudio.com") -> Some (url.Replace("/api/v3/index.json","")) | url when url.EndsWith("/api/v3/index.json") && url.Contains("myget.org") -> Some (url.Replace("/api/v3/index.json","")) | url when url.EndsWith("v2") -> Some url