title: Get TFS version programmatically
body: <p>How can I get the TFS version programmatically? </p>
  
  <p>I am trying to get the version that shows up in the TFS Administration console. </p>
  
  <p><a href="https://i.stack.imgur.com/ngjiP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ngjiP.jpg" alt="TFS Admin console"></a></p>
  
  <p>I tried the following code, but it returns the server version as "Server Version: Dev14.M89-Part7", that doesn't seem correct.</p>
  
  <pre><code>var server = new TfsTeamProjectCollection(new Uri("http://tfs2015:8080/tfs"));
  server.EnsureAuthenticated();
  var serverVersion = server.ServerDataProvider.ServerVersion;
  Console.WriteLine("Server Version: {0}", serverVersion);
  </code></pre>
  
  <p>I guess I am looking at the wrong property...</p>