首页 技术 正文
技术 2022年11月11日
0 收藏 353 点赞 3,548 浏览 1190 个字

http://blog.sina.com.cn/s/blog_58c506600101tycn.html

最近,因为国内访问Visual Studio Online(微软的免费代码托管服务,以前叫Team Foundation Service)越来越慢——原因你懂的——甚至有些时候连登录页面都刷不出来,所以我只好在Firefox浏览器中设置了用GoAgent“科学上网”。并且,Visual Studio本身也需要访问代码库和Visaul Studio Online上的TFS服务器,所以也需要给VS设置代理服务器。但是问题来了,在设置中能看到VS使用的是IE代理设置,并且没有单独的代理服务器选项。

为你的Visual Studio单独设置代理服务器

但是我并不想把整个系统的代理都设置成GoAgent,那么有没有办法单独设置VS的代理服务器而不影响Windows系统、IE和其他程序么?

答案是有的!我意识到Visual Studio本身实际上也是用.NET技术写成的,那么一些可以适用于.NET应用程序的配置也可以用在Visual Studio上。在.NET中,我们可以通过修改应用程序的config文件中的system.net节点来单独指定这个程序所使用的代理

MSDN文档如下: http://msdn.microsoft.com/en-us/library/kd3cf2ex(v=vs.110).aspx

所以问题就可以这么解决了:

1.安装并配置GoAgent,默认地址应该是127.0.0.1,端口8087 (安装过程不再详述,教程点这里http://maolihui.com/goagent-detail.html

2.使用管理员权限打开记事本(或NotePad++等文本编辑器),打开这个文件

VS 2012:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe.config

VS 2010:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config

3.搜索sytem.net节点,默认设置应该是这样的

<system.net>
       <settings>
           <ipv6 enabled=”true”/>
       </settings>
</system.net>

4.添加下面文字到system.net节点中

<defaultProxy useDefaultCredentials=”true” enabled=”true”>
    <proxy bypassonlocal=”true” proxyaddress=”
http://127.0.0.1:8087/” />
</defaultProxy>

使其变成类似这样的

为你的Visual Studio单独设置代理服务器

之后重启Visual Studio就可以了!

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,497
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,910
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,744
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,498
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,136
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,300