If you face problems accessing/installing the nuget packages from Visual Studio 2017 Enterprise edition, please follow the below steps:
Other way to add proxy entry is to run the following command:
{ return "PROXY IP Address:Port"; }
Thats your proxy.
If this doesn't work, try below:
- Copy the .nuget folder into the solution folder. It should have 3 files: Nuget.Config, Nuget.exe and Nuget.Targets
- Edit Nuget.Config as below:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageSources>
<add key="http_proxy" value="company proxy address" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="Local" value="local folder\Nuget Packages\" />
</packageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
</configuration>
- Close and Exit Visual Studio.
Other way to add proxy entry is to run the following command:
nuget.exe config -set http_proxy=http://my.proxy.address:port
In case you are wondering how to get proxy:- Open chrome, go to below URL to see the proxy details: chrome://net-internals/#proxy
- Check Proxy tab on left. Run the PAC script in browser URL
- It should download one pac file . Open in notepad. Check for something like this:
{ return "PROXY IP Address:Port"; }
Thats your proxy.
If this doesn't work, try below:
<system.net>
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy proxyaddress="http://your.proxyserver.ip:port"/>
</defaultProxy>
<settings>
<ipv6 enabled="true"/>
<servicePointManager expect100Continue="false" />
</settings>
</system.net>