Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
C#
TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(new Uri(tfsUrl),
connect);

instead of
C#
TfsConfigurationServer configurationServer =
TfsConfigurationServerFactory.GetConfigurationServer(new Uri(tfsUrl), connect);

line in order to connect version control servver but
C#
VersionControlServer vsStore = tfs.GetService<versioncontrolserver>();

line returns null
user I connect to tfs isn’t the
same user who logged in.
Posted
Updated 17-Jun-14 0:45am
v3

1 solution

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 .

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


line is not null anymore
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900