在 TFS 2015 RTM 中导入自定义版本的 Scrum 过程模板时出现错误 TF237070

Error TF237070 when importing a customized version of the Scrum process template in TFS 2015 RTM

在 TFS 2015 RTM 团队项目集合 Visual Studio 2013 年:

Exception message: The 'refname' attribute is not declared.
... 
TF237070: Importing the definition failed. 
    The definition you are trying toimport did not validate against the schema. 
    Edit the definition, then try to import it again.

这是法语的完整详细信息:

2015-08-24T15:22:04 | Module : Work Item Tracking | Thread : 26 | Validation du type d'élément de travail à partir du fichier 'D:\IA_TFS_SOPCV_DAE\CV_TFS\Dev\Migration_TFS2015\Gabarits de processus\TFS2015\IA - Scrum\WorkItem Tracking\TypeDefinitions\Task.xml'...
---début de l'entrée d'exception---
Durée : 2015-08-24T15:22:04
Module : Work Item Tracking
Message d'exception : L'attribut 'refname' n'est pas déclaré. (type XmlSchemaValidationException)
Trace de la pile d'exception : 

--- fin de l'entrée d'exception ---

---début de l'entrée d'exception---
Durée : 2015-08-24T15:22:04
Module : Engine
Description de l'événement : TF30162: la tâche "WITs" du groupe "WorkItemTracking" a échoué
Type d'exception : Microsoft.TeamFoundation.Client.PcwException
Message d'exception : TF237070: échec de l'importation de la définition. La définition que vous essayez d'importer n'a pas pu être validée par rapport au schéma. Modifiez la définition, puis réessayez de l'importer.
Trace de la pile :
   à Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Validate(ProjectCreationContext ctxt, XmlNode taskXml)
   à Microsoft.VisualStudio.TeamFoundation.PCW.ProjectCreationEngine.TaskValidator.PerformTask(IProjectComponentCreator componentCreator, ProjectCreationContext context, XmlNode taskXml)
   à Microsoft.VisualStudio.TeamFoundation.PCW.ProjectCreationEngine.RunTask(Object taskObj)
--   Exception interne   --
Message d'exception : TF237070: échec de l'importation de la définition. La définition que vous essayez d'importer n'a pas pu être validée par rapport au schéma. Modifiez la définition, puis réessayez de l'importer. (type ProvisionValidationException)
Trace de la pile d'exception :    à Microsoft.TeamFoundation.WorkItemTracking.Client.Provision.ProvisionClass.GetXml(TextReader stream, SchemaType type, ImportEventHandler handler)
   à Microsoft.TeamFoundation.WorkItemTracking.Client.Provision.ProvisionClass.GetXml(Stream stream, SchemaType type, ImportEventHandler handler)
   à Microsoft.TeamFoundation.WorkItemTracking.Client.Provision.ProvisionClass.GetXml(String xml, SchemaType schema, ImportEventHandler handler)
   à Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.WitPcwTask.WorkItemTypesTask.UploadTypeDefinition(String file, Boolean execute)
   à Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.WitPcwTask.WorkItemTypesTask.Validate()
   à Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Parse(ContextWrapper wrapper, XmlNode taskXml, Boolean fExecute)
   à Microsoft.VisualStudio.TeamFoundation.WorkItemTracking.WitPcwPlugin.PcwPluginComponentCreator.Validate(ProjectCreationContext ctxt, XmlNode taskXml)

--- fin de l'entrée d'exception ---

我比较了自定义Scrum模板

的Work Item模板"Task.xml"

WorkItem Tracking\TypeDefinitions\Task.xml

与原来的

C:\Program Files\Microsoft Team Foundation Server 14.0\Tools\Deploy\ProcessTemplateManagerFiles33\Scrum\Template.zip\WorkItem Tracking\TypeDefinitions\Task.xml

而且它们是一样的。

有什么想法吗?

好的,我花了将近 2 天的时间来处理相同的错误消息。 "Exception Message: The 'refname' attribute is not declared."。

我使用的是 Visual Studio 2013(因为 2013 TFS Power Tools 可用,但在撰写本文时 2015 TFS Power Tools 尚不可用)。在我使用 2013 TFS Power Tools 在 Visual Studio 2013 中自定义并重命名了我下载的默认 CMMI 过程模板副本后,我将其上传回 TFS 2015。这是我不断获得 "Exception Message: The 'refname' attribute is not declared." 错误。和你一样,我这辈子也想不通它究竟是哪里缺少了这个属性。

然后我有预感,我转到 Visual Studio 2015 年并尝试执行相同的上传过程。好吧 Visual Studio 2015 年给了我一条完全不同且更准确的错误消息 "VS402479: You can't overwrite the CMMI process template, because it's locked. For more information about customizing process templates, click 'Help'."。当我搜索此错误消息时,我找到了 this resource。万一这个link以后不行,就说"you can't upload any templates to TFS 2015 having the same version type as one of the predefined process templates (Agile, Scrum, CMMI) as they're now locked down. you need to change version type guid"。因此,在 ProcessTemplate.xml 文件中,请确保在 "name" 元素中为它提供唯一值,并在 "version" 元素的 "type" 属性中为其提供唯一的 GUID。您可以使用工具 -> 创建 GUID 下的 Visual Studio 工具生成唯一的 GUID。进行这些更改后,我能够使用 Visual Studio 2015 成功上传流程模板(我没有尝试 VS 2013,但我认为在进行我建议的更新后它也能正常工作)。

附加信息:你必须学习 VS2015。我更改了ID和名称并尝试使用VS2013上传并得到了同样的错误。使用 VS2015,它就像一个魅力。