Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying `dotnet add package --source` fails on another unreachable source #7999

kcd83 opened this Issue Apr 14, 2019 · 0 comments


None yet
1 participant
Copy link

kcd83 commented Apr 14, 2019

dotnet.exe fails to add a package when specifying source one when source two is unavailable.


  1. Check sources nuget source list, (one is not available)

  2. Use dotnet cli to add package from a source

dotnet add package --source Figgle

Fails, because of another source. Expected it to be ignored, only the supplied source should be used.


Disable the problematic source

nuget source disable -name 'MyCompany NuGet Server'
dotnet add package --source Figgle

Verbose Logs

C:\Data\gitlab\kcd\dotnet-cli-test> dotnet add package --source Figgle
  Writing C:\Users\kdyer\AppData\Local\Temp\tmpA6D3.tmp
info : Adding PackageReference for package 'Figgle' into project 'C:\Data\gitlab\kcd\dotnet-cli-test\dotnet-cli-test.csproj'.
log  : Persisting no-op dg to C:\Data\gitlab\kcd\dotnet-cli-test\obj\dotnet-cli-test.csproj.nuget.dgspec.json
info : Restoring packages for C:\Data\gitlab\kcd\dotnet-cli-test\dotnet-cli-test.csproj...
info :   GET https://nuget.mycompany.local/FindPackagesById()?id='Figgle'&semVerLevel=2.0.0
info :   GET'Figgle'&semVerLevel=2.0.0
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'https://nuget.mycompany.local/FindPackagesById()?id='Figgle'&semVerLevel=2.0.0'.
log  : No such host is known.
info :   GET https://nuget.mycompany.local/FindPackagesById()?id='Figgle'&semVerLevel=2.0.0
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'https://nuget.mycompany.local/FindPackagesById()?id='Figgle'&semVerLevel=2.0.0'.
log  : No such host is known.
info :   GET https://nuget.mycompany.local/FindPackagesById()?id='Figgle'&semVerLevel=2.0.0
error: Failed to retrieve information about 'Figgle' from remote source 'https://nuget.mycompany.local/FindPackagesById()?id='Figgle'&semVerLevel=2.0.0'.
error:   No such host is known.


dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview3-010431
 Commit:    d72abce213

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\

Host (useful for support):
  Version: 3.0.0-preview3-27503-5
  Commit:  3844df9537

.NET Core SDKs installed:
  1.0.4 [C:\Program Files\dotnet\sdk]
  3.0.100-preview3-010431 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.0.0-preview3-19153-02 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview3-27503-5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview3-27504-2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
NuGet Version:

I understand dotnet add package is maintained by this team?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.