Reputation: 2492
I try to connect to TFS from code:
public TFS2013Client(Uri tfsURI, Logger logger)
{
_logger = logger;
TfsURI = tfsURI;
_configurationServer = TfsConfigurationServerFactory.GetConfigurationServer(TfsURI);
_server = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(tfsURI);
_version = _server.GetService(typeof(VersionControlServer)) as VersionControlServer; //error at this line
}
So, at my Visual Studio i can connect to TFS. At code i use URI like this: "http://tfs-server:8080/tfs".
So, it can be because i:
Thank you!
Upvotes: 1
Views: 3310
Reputation: 3326
you need to mention your projectcollectionname as well use "http://tfs-server:8080/tfs/projectcollectionname" instead of http://tfs-server:8080/tfs
Upvotes: 4