OS version (i.e. win10 v1607 (14393.321)):
win10 v1709 16299.248
Worked before? If so, with which NuGet version:
Yes, 4.0.0.2283
I reproed the broken behavior in all versions of the SDK 2.0.0 and greater. The code that hit this was previously working on a pre-release version of the 2.0 SDK. As I mentioned below I suspect the 2.0 era change was what broke it.
Detailed repro steps so we can see the same problem
@rrelyea can you triage this? Appears to be a regression when passing in -s on the commandline to dotnet restore. Regression happened between 1.x and 2.x.
Details about Problem
When passing in an HTTP URL source preceded by a local source NuGet is munging the URL.
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): dotnet.exe
NuGet version (x.x.x.xxx): 4.7.0.4927
dotnet.exe --version (if appropriate): 2.1.300-preview2-008349
OS version (i.e. win10 v1607 (14393.321)): win10 v1709 16299.248
Worked before? If so, with which NuGet version: Yes, 4.0.0.2283
I reproed the broken behavior in all versions of the SDK 2.0.0 and greater. The code that hit this was previously working on a pre-release version of the 2.0 SDK. As I mentioned below I suspect the 2.0 era change was what broke it.
Detailed repro steps so we can see the same problem
Create a project and add a reference:
Run restore passing two sources, the first a local path, the second a url.
Expect: Successfully restore
Actual: Fails with following error
Note that the URL has been mangled: slashes converted to backslashes, deduped, then concated with the working dir. I suspect this is related to https://github.com/NuGet/NuGet.Client/commit/73fbfdf9c770733f9a1d95e0803f68777446f4db. @emgarten
Verbose Logs
msbuild.log
Sample Project
nuGetRestoreTest.zip
/cc @ahsonkhan