I setup `TFS Express 2017` on a server machine and customized the `Agile` process with a new name "My Agile", changed `GUID` and `minor` in `ProcessTemplate.xml` file. Then I uploaded the Process template using visual studio Express 2017 RC. Then I created a couple of Projects based on new template, everything work fine. Then I added a couple of fields in the `Bug` work item type and updated the Process Template using `witadmin` command. I was able to see the newly added fields in Bug Work Item for existing Projects. Then I thought of uploading the newly edited template using `Visual studio 2017 ->Team->Team Project Collection Settings-> Process Template Manager.`
I got the error message 

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

```

and here is the error log

```
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 ---

```

Honestly speaking I have not changed anything else other than what I have mentioned above and I did not even touch the file `WorkItem Tracking\LinkTypes\SharedStep.xml` which according to error log is causing the error.