Docs: Is there a way to specify which nuget source to use?

Created on 27 Jun 2019  Â·  4Comments  Â·  Source: dotnet/docs

I've been reading the docs and I have an issue with the CLI that is:

I'm trying to install a global tool using dotnet tool install --g dotnet-outdated and within my local nuget, I have a few nuget feed. Instead of trying to download from the nuget.org which is the default source, is trying to download from one of the private nuget feed.

This private nuget feed only works within the company's network infrastructure and trying to download a tool that is completely unrelated to my workplace, it gets stuck on trying to download on the private feed instead of going to other sources.

So the question is: Is there any way to specify which source to download it?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Area - .NET Core Guide Technology - CLI product-question

Most helpful comment

you could try one of

  1. add --ignore-failed-sources, so even your private feed fails, it will continue to try other feed
  2. create a new nuget.config in the directory you run the command (pwd directory). And specify the feed there
  3. edit your global nuget config, to remove the private feed. Note, this will change all the feed configuration. Including your project's restore

%appdata%\NuGet\nuget.config on windows
~/.nuget/NuGet/NuGet.Config on mac

All 4 comments

Thanks for your question @minuz. @KathleenDollard @livarcocc can you help with this question about dotnet tool install?

Adding @wli3

you could try one of

  1. add --ignore-failed-sources, so even your private feed fails, it will continue to try other feed
  2. create a new nuget.config in the directory you run the command (pwd directory). And specify the feed there
  3. edit your global nuget config, to remove the private feed. Note, this will change all the feed configuration. Including your project's restore

%appdata%\NuGet\nuget.config on windows
~/.nuget/NuGet/NuGet.Config on mac

Thanks @wli3!! This is what I was looking!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Manoj-Prabhakaran picture Manoj-Prabhakaran  Â·  3Comments

ygoe picture ygoe  Â·  3Comments

mekomlusa picture mekomlusa  Â·  3Comments

LJ9999 picture LJ9999  Â·  3Comments

sime3000 picture sime3000  Â·  3Comments