如何在Visual Studio 2015中设置代理

如何在Visual Studio 2015中设置代理

问题描述:

我正在使用Visual Studio 2015进行Xamarin应用程序开发,并且正在使用公司代理,因此我需要将代理(http代理)设置为Visual Studio 2015,那么如何获得设置代理的窗口?

I'm Using Visual Studio 2015 for Xamarin app development and I'm working behind corporate proxy, I need to set the proxy(http proxy) to the Visual studio 2015, so how could I get such window to set proxy ?

在安装目录中找到devenv.exe.config.

现在打开此文本文件,并将节点<defaultProxy>添加到节点<system.net>内.

Now open this text file and add the node <defaultProxy> inside the node <system.net>.

<system.net>
<defaultProxy useDefaultCredentials="true" enabled="true">
    <proxy bypassonlocal="true" proxyaddress="http://yourproxyaddress.net:8080" />
</defaultProxy>
</system.net>

如果您的代理服务器需要身份验证,则应将其作为参数添加到代理服务器URL中

If your proxy requires authentication, you should add those as parameters in the proxy URL

<system.net>
<defaultProxy useDefaultCredentials="true" enabled="true">
    <proxy bypassonlocal="true" proxyaddress="http://Username:Password@yourproxyaddress.net:8080" />
</defaultProxy>
</system.net>