1
我想从TFS中查询一些工作项,但GetService时,出现异常。有人能帮我吗。构建Workitem商店时出现异常
ICredentials networkCredential = new NetworkCredential("XXX", "XX", "XXX");
Uri tfsUri = new Uri(@"http://tfs:8080/tfs/DefaultCollection");
TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(tfsUri, networkCredential);
tfs.EnsureAuthenticated();
WorkItemStore Store = (WorkItemStore)tfs.GetService(typeof(WorkItemStore));
错误:
类型的未处理的异常 'System.IO.FileNotFoundException' 发生在Microsoft.TeamFoundation.WorkItemTracking.Client.dll
其他信息:无法加载文件或程序集 'Microsoft.TeamFoundation.WorkItemTracking.Proxy,Version = 11.0.0.0, Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'或其中一个 依赖关系。该系统找不到指定的文件。
您可能更好地使用Nuget上可用的TFS对象模型,因为它不需要安装TE。 –