I'm trying to connect to TFS 2010 using TFS SDK, but can't get VersionControlServer service.
var servers = RegisteredTfsConnections.GetConfigurationServers(); // ok
then
var tfs = new TfsConfigurationServer(servers.First().Uri, CredentialCache.DefaultNetworkCredentials);
// or
var tfs = new TfsConfigurationServer(servers.First());
both always returns null:
var vc = (VersionControlServer)tfs.GetService<VersionControlServer>(); // null!
What should I do?