What's the command line switch to get NuGet.exe to completely bypass the http proxy?

StackOverflow https://stackoverflow.com/questions/15098768

  •  15-03-2022
  •  | 
  •  

Question

I've found plenty of documentation on command line switches for specifying an HTTP proxy for NuGet.exe to use when fetching packages.

What is the switch to tell NuGet.exe to completely bypass the currently-configured http proxy? I am going to be automating NuGet to run on a number of machines, and thus I do not want to manually configure the proxy settings on each machine, but instead specify it in the NuGet.exe commandline.

Was it helpful?

Solution

As I know there is no command in command line tool to do this. As a workaround you can prepare few different NuGet.config-s for different types of machines and just copy it to %APPDATA%\NuGet\NuGet.Config. But in this case you solutions with enabled Package Restore must not have proxy settings in their .nuget\NuGet.config

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top