无法加载文件或程序集"Microsoft.VisualStudio.Services.Common,Version = 12.0.21005.1,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a"

Sus*_*ita 1 .net c# tfs visual-studio-2015

Could not load file or assembly "Microsoft.VisualStudio.Services.Common, Version=12.0.21005.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a当我尝试使用下面的代码连接到我的TFS服务器(使用C#)时,我不断收到异常消息:

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

代码参考自:

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

在我的本地系统或互联网上找不到这个dll- " Microsoft.VisualStudio.Services.Common ".

你能帮忙解决我错过的问题吗?

And*_*SFT 7

我测试了一段代码,eveything按预期工作.

那么,你是如何创建项目的?您是否安装了Nuget软件包:Microsoft.TeamFoundationServer.ExtendedClient

如果还没有,只需尝试安装Package Manager Console,然后再次检查.

在此输入图像描述