Click here to Skip to main content
15,074,987 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

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[^]
But i use
TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(new Uri(tfsUrl),

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

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

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

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 .

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

line is not null anymore

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