VS 2008如何连接TFS 2010
首先我们要打两个补丁包
Microsoft Visual Studio 2008 Service Pack 1
剩下的连接工作相当简单,按照如下的格式填写Team Foundation Server name: http://[tfsserver]:[port]/[vdir]/[projectCollection]
看起来有些复杂,其实还是很好理解的。
TFS 2010有个新特性,可以指定一个虚拟目录(virtual directory),默认情况下是tfs。如果你的TFS服务器的名字是tfs2,使用默认的虚拟目录:tfs。端口默认是8080。TFS 2010下可以管理很多个collection,默认的名字是defaultcollection。
如果大部分都使用默认值的话,这个“连接字符串”可以写为:http://tfs2:8080/tfs/defaultcollection。
VS2005无法连接到TFS 2010,所以如果使用VS2005做为开发工具,且没有升级的要求,就不要升级到TFS 2010。
在从VS 2008 连接到TFS 2010 过程中,可能会产生一些错误,大部分是因为没有安装好补丁包导致的。这里列举两个我曾遇到的问题:
- 当填好Server Name之后,点击确定。提示如下错误:TF30335: The server name cannot contain the characters '/' or ':' or start with 'http://' or 'https://。这是因为没有安装Microsoft Visual Studio 2008 Service Pack 1。也有一种可能是先装的SP1,然后再安装的Team Explorer,这种情况下需要重新安装SP1。
- 同样的Server Name,提示不同的错误:TF31002: Unable to connect to this Team Foundation Server: http://tfs2:8080/tfs. Possible reasons for failure include:
- The Team Foundation Server name, port number or protocol is incorrect.
- The Team Foundation Server is offline.
- Password is expired or incorrect.
这是因为没有安装Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010,相信安装好后,能成功连接。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步