Skip to content

dotnet restore fails when custom sources (local+url) are specified #7413

@alexeypukhov

Description

@alexeypukhov

Nuget appends nuget source url to the current work dir and treats it as a local folder instead of url when I pass runtime and two sources: one local path + one url

When I remove runtime it starts to work


dotnet --info:
.NET Core SDK (reflecting any global.json):
Version: 2.1.403
Commit: 04e15494b6

Runtime Environment:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.403\

Host (useful for support):
Version: 2.1.5
Commit: 290303f510


Repro:

  1. dotnet new console
  2. dotnet publish -r win-x64 --source ./ --source https://api.nuget.org/v3/index.json

Error:
C:\Program Files\dotnet\sdk\2.1.403\NuGet.targets(114,5): error : The local source 'C:\Workspace\test\https:\api.nuget.org\v3\index.json' doesn't exist. [C:\Workspace\test\test.csproj]

1.log

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions