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

Microsoft.TeamFoundation.WorkItemTracking.Client.VerbatimMessageException was unhandled

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

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

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.

我正在使用:

完整的异常如下:

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。

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

我在过程中还是运行陷入了异常,但是这个具体的问题是这样解决的。