Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly "Microsoft.VisualStudio.Services.Common, Version=12.0.21005.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

I keep getting the exception message Could not load file or assembly "Microsoft.VisualStudio.Services.Common, Version=12.0.21005.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a when I try to connect to my TFS server (using C#) while using the below piece of code:

Uri tfsUri = (args.Length < 1) ? 
new Uri("http://Server:Port/VDir") : new Uri(args[0]);
TfsConfigurationServer configurationServer = TfsConfigurationServerFactory.GetConfigurationServer(tfsUri);

The code is referred from:

https://msdn.microsoft.com/en-us/library/bb286958(v=vs.120).aspx

Could not find this dll - "Microsoft.VisualStudio.Services.Common" in my local system nor over the internet.

Can you please help on what am I missing?

like image 448
Sushmita Avatar asked Jan 18 '18 10:01

Sushmita


1 Answers

I tested with the piece of code, eveything works as expected.

So, how did you create the project? Have you installed the Nuget packages : Microsoft.TeamFoundationServer.ExtendedClient

If not yet, just try to install it inPackage Manager Console, then check it again.

enter image description here

like image 134
Andy Li-MSFT Avatar answered Oct 16 '22 03:10

Andy Li-MSFT