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

ite-klass picture ite-klass  Â·  3Comments

skylerberg picture skylerberg  Â·  3Comments

ike86 picture ike86  Â·  3Comments

stanuku picture stanuku  Â·  3Comments

Eilon picture Eilon  Â·  3Comments