如何在不同的凭据tfs 2013下获取VersionControlServer [英] How do I get VersionControlServer under different Credentials tfs 2013

查看:84
本文介绍了如何在不同的凭据tfs 2013下获取VersionControlServer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我需要连接到tfs的VersionControlServer,我应该用不同的凭证连接
。我通过使用

来连接这个tfs案例3:通过URI连接,这篇文章中的自定义凭证

http://geekswithblogs.net/TarunArora/archive/2011/06/18/tfs-2010- sdk-connecting-to-tfs-2010-programmaticallyndashpart-1.aspx [ ^ ]

但是我使用

Hello,

I need to connect to VersionControlServer of the tfs which i should
connect in different credentials . I connect this tfs by using
Case 3: Connect by URI, custom credentials in this post
http://geekswithblogs.net/TarunArora/archive/2011/06/18/tfs-2010-sdk-connecting-to-tfs-2010-programmaticallyndashpart-1.aspx[^]
But i use

TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(new Uri(tfsUrl),
connect);



而不是


instead of

TfsConfigurationServer configurationServer =
TfsConfigurationServerFactory.GetConfigurationServer(new Uri(tfsUrl), connect);



line in为了连接版本控制服务器但是


line in order to connect version control servver but

VersionControlServer vsStore = tfs.GetService<versioncontrolserver>();



line返回null

用户我连接到tfs不是

登录的用户。


line returns null
user I connect to tfs isn’t the
same user who logged in.

推荐答案

在10.0和12.0之后,有两个不同的Visual Studio dll库,其中一些tfs dll来自10.0,而其他来自12.0。作为一个解决方案,我从12.0中选择了所有这些并且它起作用。



There were two different Visual Studio dll libraries after all 10.0 and 12.0 some tfs dlls were from 10.0 while other were from 12.0 . As a solution i picked all of them from 12.0 and it worked .

VersionControlServer vsStore = tfs.GetService<versioncontrolserver>();
</versioncontrolserver>





行不再为空



line is not null anymore


这篇关于如何在不同的凭据tfs 2013下获取VersionControlServer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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