未处理Microsoft.TeamFoundation.WorkItemTracking.Client.VerbatimMessageException

时间:2019-06-20 00:42:59

标签: vb.net tfs visual-studio-2015

我有更新TFS全局列表的代码,因此当新客户添加到我们的客户跟踪软件时,它会更新“客户名称”列表。

该代码能够获取GlobalList并更新xml。但是,当我致电store.ImportGlobalLists(globalList.InnerXml)时,我得到了一个例外。 store变量是WorkItemStore我可以找到的关于此异常的唯一相关信息是here,它没有提供太多其他信息。该异常提供了更多信息:

  

您不能使用以下命令修改工作项跟踪对象的定义   您的命令行工具版本,因为它们与   Team Foundation Server的Web服务。与您的系统联系   管理员确定如何升级Team的安装   浏览器,查找与Team Foundation Server兼容的版本。

我正在使用:

  • Visual Studio 2015版本14.0.25431.03更新3
  • .NET版本4(不使用NuGets进行TFS通信)
  • TFS版本2015(14.102.25423.0)

完整例外如下:

Microsoft.TeamFoundation.WorkItemTracking.Client.VerbatimMessageException was unhandled
  ErrorId=0
  HResult=-2146232832
  IsRemoteException=True
  LogException=False
  Message=TF223006: You cannot modify the definition of a work item tracking object with your version of command-line tools as they are not compatible with the Web services for Team Foundation Server. Contact your system administrator to determine how to upgrade your installation of Team Explorer to a version compatible with Team Foundation Server.
  Source=Microsoft.TeamFoundation.WorkItemTracking.Client
  StackTrace:
       at Microsoft.TeamFoundation.WorkItemTracking.Client.Provision.ProvisionClass.Submit(ActionType action, MetadataProvider mdp, Int32 projectId, WITImporter importer)
       at Microsoft.TeamFoundation.WorkItemTracking.Client.Provision.ProvisionClass.ImportGlobalListsInternal(XmlElement listsElement)
       at Microsoft.TeamFoundation.WorkItemTracking.Client.Provision.ProvisionClass.ImportGlobalLists(String lists)
       at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.ImportGlobalLists(String lists)
       ...
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 
       Actor=/tfs/DefaultCollection/WorkItemTracking/v4.0/ClientService.asmx
       HResult=-2146233087
       Lang=""
       Message=TF223006: You cannot modify the definition of a work item tracking object with your version of command-line tools as they are not compatible with the Web services for Team Foundation Server. Contact your system administrator to determine how to upgrade your installation of Team Explorer to a version compatible with Team Foundation Server.
       Node=/tfs/DefaultCollection/WorkItemTracking/v4.0/ClientService.asmx
       Role=""
       Source=Microsoft.TeamFoundation.WorkItemTracking.Proxy
       StackTrace:
            at Microsoft.TeamFoundation.WorkItemTracking.Proxy.RetryHandler.HandleSoapException(SoapException se)
            at Microsoft.TeamFoundation.WorkItemTracking.Proxy.WorkItemServer.Update(String requestId, XmlElement package, XmlElement& result, MetadataTableHaveEntry[] metadataHave, String& dbStamp, IMetadataRowSets& metadata)
            at CProdStudioBackendChannel.Update(CProdStudioBackendChannel* , Boolean fBatchSave, UInt16* bstrXMLUpdateData, UInt16** pbstrXMLUpdateData, WorkItemServer clientService)
       InnerException: 

作为旁注,我确实尝试将TFS Power Tools更新到2015,但是已经安装了。我确实安装了VS 2010和VS 2017,但听起来可以并排安装多个版本的Power Tools。

1 个答案:

答案 0 :(得分:0)

我需要将Microsoft.TeamFoundationServer.Client更改为版本14.102.0。为此,我需要将解决方案更新到.NET 4.5,并更新其他一些NuGet,以使代码在构建后不显示错误。

在此过程中我仍然遇到异常,但是这个特定问题已通过这种方式解决。