TFS API:找不到方法:' Boolean Microsoft.TeamFoundation.WorkItemTracking.Proxy.IWorkItemRowSets.TryGetRowSet

时间:2016-05-31 10:24:00

标签: tfs tfs-workitem tfs-sdk

我已经使用TFS api方法在我的开发环境中连接Team Foundation Server 2012.我的api调用正常工作以连接Team Foundation Server 2012和2010.但现在我想连接Team Foundation Server 2013及更高版本。不支持我目前的Api方法而且我遇到了这个问题。

我的示例代码

Workitemstore.GetWorkItem("1")

我收到此错误:

  

找不到方法:' Boolean Microsoft.TeamFoundation.WorkItemTracking.Proxy.IWorkItemRowSets.TryGetRowSet(System.String,Microsoft.TeamFoundation.WorkItemTracking.Proxy.IRowSet ByRef)'。   StackTrace:在Microsoft.TeamFoundation.WorkItemTracking.Client.ProxyRowSetCollectionHelper.TryGetRowSet(String name,IRowSetHelper& rowset)      在Microsoft.TeamFoundation.WorkItemTracking.Internals.WorkItemHelper.LoadRevisions(IRowSetCollectionHelper表,IWorkItemOpenFieldDataHelper helper,Dictionary`2 latestData)      在Microsoft.TeamFoundation.WorkItemTracking.Internals.WorkItemHelper.LoadWorkItemFieldData(IRowSetCollectionHelper表,IWorkItemOpenFieldDataHelper helper)      在Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.LoadWorkItemFromRowSetInternal(Int32 rev,Nullable`1 asof,IWorkItemRowSets witem)      在Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem..ctor(WorkItemStore store,Int32 id)      在Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.GetWorkItem(Int32 id)      at ExportTFS.Windows.FilterForm.btnSearchImport_Click_1(Object sender,EventArgs e)   来源:Microsoft.TeamFoundation.WorkItemTracking.Client

有人知道如何解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

Microsoft.TeamFoundation.WorkItemTracking.Proxy程序集来自GAC - GAC版本高于Reference Assembly文件夹中的程序集。所以你得到这个错误。

尝试将代理库从GAC文件夹复制到项目中并明确引用它。

有用的链接: