Powershell Nuget Proxy Tip
Let’s toggle nuget proxy configuration with a powershell alias.
Using public nuget sources as well as private sources through a proxy can be tulmiltuous at times. That’s why I wrote a little script to toggle the nuget proxy and enable or disable the private source depending on my location and sort of project I’m working on.
First the script
$proxy = 'my-corp-proxy.com:8080' $source = "Private-Repository" $value = (nuget config HTTP_PROXY 2> $null) if ($proxy -eq $value) { nuget config -Set HTTP_PROXY= Write-Host The $value proxy was removed.