0
$uri = "https://myserver.com:443/tfs"
$tfsConfigurationServer = [Microsoft.TeamFoundation.Client.TfsConfigurationServerFactory]::GetConfigurationServer($uri)

gives this error on the power shell script

Unable to find type [Microsoft.TeamFoundation.Client.TfsConfigurationServerFactory].

Adding this line add the dll to only the curreent session.

Add-Type -Path “C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\TestAgent\Microsoft.TeamFoundation.Client.dll”

My question is what do I need to do/install to get Microsoft.TeamFoundation.Client.TfsConfigurationServerFactory in my pc? I can see the dlls in this location of my PC.

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\TestAgent\Microsoft.TeamFoundation.Client.dll

I have VS 2017 installed and using windows 10

user3634685
  • 431
  • 3
  • 7
  • 15

1 Answers1

0

A simple google search would've found your answer. Have you not browsed this thread?

Unable to find type [Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory]

rad_
  • 301
  • 1
  • 12
  • Tried that and getting this error: Exception calling "GetConfigurationServer" with "1" argument(s): "Could not load file or assembly 'Microsoft.TeamFoundation.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified." on this line. $tfsConfigurationServer =Microsoft.TeamFoundation.Client.TfsConfigurationServerFactory]::GetConfigurationServer($uri) – user3634685 Dec 12 '18 at 21:28
  • Did you fetch nuget.exe? – rad_ Dec 14 '18 at 16:44