TF30162:来自“WorkItemTracking”组的任务“LinkTypes”失败

时间:2017-02-05 09:04:59

标签: tfs visual-studio-2017 tfs2017

我在服务器计算机上设置TFS Express 2017并使用新名称“我的敏捷”自定义了Agile进程,在GUID中更改了minorProcessTemplate.xml文件。然后我使用visual studio Express 2017 RC上传了Process模板。然后我根据新模板创建了几个项目,一切正常。然后我在Bug工作项类型中添加了几个字段,并使用witadmin命令更新了处理模板。我能够在现有项目的Bug工作项中看到新添加的字段。然后我想到使用Visual studio 2017 ->Team->Team Project Collection Settings-> Process Template Manager.上传新编辑的模板 我收到了错误消息

TFS30129: Failed to upload process template. See error log for details

这是错误日志

2017-02-05T12:35:14 | Module: Engine | Thread: 27 | Starting process template validation
2017-02-05T12:35:14 | Module: Engine | The user identity information was retrieved from the Group Security Service | Completion time: 0 seconds
2017-02-05T12:35:14 | Module: Engine | Thread: 27 | Process template XML loaded
2017-02-05T12:35:14 | Module: Engine | Thread: 27 | Starting process template validation
2017-02-05T12:35:14 | Module: Engine | Thread: 42 | Running Task "UploadStructure" from Group "Classification"
2017-02-05T12:35:14 | Module: Engine | Task "UploadStructure" from Group "Classification" completed with success | Completion time: 0.0010001 seconds
2017-02-05T12:35:14 | Module: Engine | Thread: 42 | Running Task "" from Group ""
2017-02-05T12:35:14 | Module: Engine | Thread: 15 | Running Task "GroupCreation1" from Group "Groups"
2017-02-05T12:35:15 | Module: Engine | Task "GroupCreation1" from Group "Groups" completed with success | Completion time: 0.4290429 seconds
2017-02-05T12:35:15 | Module: Engine | Thread: 20 | Running Task "" from Group ""
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | Running Task "LinkTypes" from Group "WorkItemTracking"
2017-02-05T12:35:15 | Module: Work Item Tracking | Thread: 15 | LinkType definition file found: C:\Users\wasimqadir\Desktop\MyTest\WorkItem Tracking\LinkTypes\SharedStep.xml
2017-02-05T12:35:15 | Module: Work Item Tracking | Thread: 15 | LinkType definition file found: C:\Users\wasimqadir\Desktop\MyTest\WorkItem Tracking\LinkTypes\TestedBy.xml
2017-02-05T12:35:15 | Module: Work Item Tracking | Thread: 15 | LinkType definition file found: C:\Users\wasimqadir\Desktop\MyTest\WorkItem Tracking\LinkTypes\SharedParameterLink.xml
2017-02-05T12:35:15 | Module: Work Item Tracking | Thread: 15 | Validating link types from file 'C:\Users\wasimqadir\Desktop\MyTest\WorkItem Tracking\LinkTypes\SharedStep.xml'...
---begin Exception entry---
Time: 2017-02-05T12:35:15
Module: Engine
Event Description: TF30162: Task "LinkTypes" from Group "WorkItemTracking" failed
Exception Type: Microsoft.TeamFoundation.Client.PcwException
Exception Message: An item with the same key has already been added.
Stack Trace:
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Validate(ProjectCreationContext ctxt, XmlNode taskXml)
   at Microsoft.VisualStudio.TeamFoundation.PCW.ProjectCreationEngine.TaskValidator.PerformTask(IProjectComponentCreator componentCreator, ProjectCreationContext context, XmlNode taskXml)
   at Microsoft.VisualStudio.TeamFoundation.PCW.ProjectCreationEngine.RunTask(Object taskObj)
--   Inner Exception   --
Exception Message: An item with the same key has already been added. (type ArgumentException)
Exception Stack Trace:    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinitionCollection.AddField(FieldDefinition fd, List`1 l)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinitionCollection.<>c__DisplayClass1_1.<.ctor>b__0(PsFieldMetadataRecord f)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.Metadata.Snapshot.ScanFields(Action`1 action)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinitionCollection..ctor(WorkItemStore store, PsDatastoreItemTypeEnum oType, Boolean filtered)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.ClientMetadataProvisioningHelper..ctor(WorkItemStore store, ImportEventHandler importEventHandler)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.LinkTypeXmlBuilder.Translate(XmlElement linkTypesElement, Boolean insertsOnly)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.Provision.ProvisionClass.ImportValidateWorkItemLinkTypeInternal(XmlElement typeElement, ProvisioningActionType action, Boolean insertsOnly)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.Provision.ProvisionClass.ImportValidateWorkItemLinkType(String definition, ProvisioningActionType action, Boolean insertsOnly)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemLinkTypeCollection.Validate(String definitionXml)
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.WitPcwTask.LinkTypesTask.UploadLinkTypeDefinition(String file, Boolean execute)
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.WitPcwTask.LinkTypesTask.Validate()
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Parse(ContextWrapper wrapper, XmlNode taskXml, Boolean fExecute)
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Validate(ProjectCreationContext ctxt, XmlNode taskXml)

--- end Exception entry ---

2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "WITs" from Group "WorkItemTracking" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "Queries" from Group "WorkItemTracking" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "Categories" from Group "WorkItemTracking" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "ProcessConfiguration" from Group "WorkItemTracking" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "" from Group "" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "VersionControlTask" from Group "VersionControl" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "" from Group "" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "BuildTask" from Group "Build" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "" from Group "" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "LabTask" from Group "Lab" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "" from Group "" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "TestVariable" from Group "TestManagement" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "TestConfiguration" from Group "TestManagement" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "TestSettings" from Group "TestManagement" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "TestResolutionState" from Group "TestManagement" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "" from Group "" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "Site" from Group "Reporting" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "Populate Reports" from Group "Reporting" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "" from Group "" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "SharePointPortal" from Group "Portal" will not be run because a prior task failed.
2017-02-05T12:35:15 | Module: Engine | Thread: 15 | TF30202: Task "" from Group "" will not be run because a prior task failed.
---begin Exception entry---
Time: 2017-02-05T12:35:15
Module: Template Importer
Exception Message: TF30175: Process template validation failed (type ValidationFailedException)
Exception Stack Trace:    at Microsoft.VisualStudio.TeamFoundation.PCW.EngineStarter.ValidateTemplate(DirectoryInfo templateDirectory)
   at Microsoft.VisualStudio.TeamFoundation.PCW.TemplateManagementService.ValidateMethodology(String folderPath, ILogHandler logHandler)
   at Microsoft.VisualStudio.TeamFoundation.PCW.TemplateManagementService.Import(String folderPath, ILogHandler logHandler)

Inner Exception Details:

Exception Message: TF30162: Task "LinkTypes" from Group "WorkItemTracking" failed (type TaskFailedException)
Exception Stack Trace:    at Microsoft.VisualStudio.TeamFoundation.PCW.ProjectCreationEngine.PerformAllTasks(ITaskPerformer taskPerformer, ProjectCreationContext creationContext, List`1 projectTasks)
   at Microsoft.VisualStudio.TeamFoundation.PCW.EngineStarter.RunEngine(Boolean isValidationRun, String templateFolder)
   at Microsoft.VisualStudio.TeamFoundation.PCW.EngineStarter.ValidateTemplate(DirectoryInfo templateDirectory)

Inner Exception Details:

Exception Message: An item with the same key has already been added. (type PcwException)
Exception Stack Trace:    at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Validate(ProjectCreationContext ctxt, XmlNode taskXml)
   at Microsoft.VisualStudio.TeamFoundation.PCW.ProjectCreationEngine.TaskValidator.PerformTask(IProjectComponentCreator componentCreator, ProjectCreationContext context, XmlNode taskXml)
   at Microsoft.VisualStudio.TeamFoundation.PCW.ProjectCreationEngine.RunTask(Object taskObj)

Inner Exception Details:

Exception Message: An item with the same key has already been added. (type ArgumentException)
Exception Stack Trace:    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinitionCollection.AddField(FieldDefinition fd, List`1 l)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinitionCollection.<>c__DisplayClass1_1.<.ctor>b__0(PsFieldMetadataRecord f)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.Metadata.Snapshot.ScanFields(Action`1 action)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinitionCollection..ctor(WorkItemStore store, PsDatastoreItemTypeEnum oType, Boolean filtered)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.ClientMetadataProvisioningHelper..ctor(WorkItemStore store, ImportEventHandler importEventHandler)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.LinkTypeXmlBuilder.Translate(XmlElement linkTypesElement, Boolean insertsOnly)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.Provision.ProvisionClass.ImportValidateWorkItemLinkTypeInternal(XmlElement typeElement, ProvisioningActionType action, Boolean insertsOnly)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.Provision.ProvisionClass.ImportValidateWorkItemLinkType(String definition, ProvisioningActionType action, Boolean insertsOnly)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemLinkTypeCollection.Validate(String definitionXml)
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.WitPcwTask.LinkTypesTask.UploadLinkTypeDefinition(String file, Boolean execute)
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.WitPcwTask.LinkTypesTask.Validate()
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Parse(ContextWrapper wrapper, XmlNode taskXml, Boolean fExecute)
   at Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Validate(ProjectCreationContext ctxt, XmlNode taskXml)

--- end Exception entry ---

老实说,除了我上面提到的内容之外,我没有改变任何其他内容,我甚至没有触及根据错误日志导致错误的文件WorkItem Tracking\LinkTypes\SharedStep.xml

2 个答案:

答案 0 :(得分:1)

事实证明这是因为我在Visual Studio 2017 RC上安装了Update。我的Process模板没有任何问题。

答案 1 :(得分:0)

这个问题有两种解决方案。

  • 您收到此错误,因为您的VS 2017未更新。检查您是否安装了最新更新。
  • 尝试使用VS(VS 2012)的旧版本(任何稳定版本)添加此项目。