RegisteredTfsConnections.GetProjectCollection在测试服务器上返回null,但在dev服务器上不返回 [英] RegisteredTfsConnections.GetProjectCollection returns null on test server, but not on dev server

查看:235
本文介绍了RegisteredTfsConnections.GetProjectCollection在测试服务器上返回null,但在dev服务器上不返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅话题。一切正常对我devmachine哪里VStudio2010安装。
,而不是一个干净的测试服务器上(安装项目包括所有用于TFS组件)

See topic. Everything works fine on my devmachine where VStudio2010 are installed. But not on a clean test server (The setup project includes all used TFS assemblies).

该文档的 http://msdn.microsoft.com/en-us/library/ff735997.aspx 是不是回报非常有帮助值:

The docs http://msdn.microsoft.com/en-us/library/ff735997.aspx is not very helpful about the return value:

NULL,如果没有找到匹配

Null if no match is found.

我应该用另一种方法来获得一个TFS连接?我只是想列出,并从一个特定的项目下载一些文件。

Should I use another method to get a TFS connection? I'm just trying to list and download some files from a specific project.

更新

我又回到了这一点:

        var uri = new Uri("http://myserver/");
        var tfs = new TeamFoundationServer(uri);
        var versionControl = tfs.GetService<VersionControlServer>();



其中一期工程。但 TeamFoundationServer 已经过时了。所以我想知道如何做到这一点的新方式

Which works. But TeamFoundationServer is obsolete. So I would like to know how to do it in the new way.

推荐答案

我使用的:

var uri = new Uri("http://myserver/");
var server = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(uri);

这篇关于RegisteredTfsConnections.GetProjectCollection在测试服务器上返回null,但在dev服务器上不返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆