0
votes

I get this error on the validation of the Work Item "Task.xml" when importing a customized version of the Scrum process template with a new name and a new ID in a TFS 2015 RTM team project collection with 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.

Here is the full detail in french :

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

I compared the Work Item template "Task.xml" of the customized Scrum Template

WorkItem Tracking\TypeDefinitions\Task.xml

with the original one

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

and they are the same.

Any idea?

2

2 Answers

0
votes

OK I spent almost 2 days with the same error message. "Exception Message: The 'refname' attribute is not declared.".

I was using Visual Studio 2013 (because the 2013 TFS Power Tools were available, but the 2015 TFS Power Tools as of this writing are not yet available). After I customized and renamed my downloaded copy of the default CMMI process template in Visual Studio 2013 using the 2013 TFS Power Tools, I then went to upload it back up to TFS 2015. This is when I kept getting the "Exception Message: The 'refname' attribute is not declared." error. Like you, for the life of me I could not figure out where it was actually missing the attribute.

Then I had a hunch, and I went over to Visual Studio 2015 and tried to do the same upload process. Well Visual Studio 2015 gave me a completely different and more accurate error message saying "VS402479: You can't overwrite the CMMI process template, because it's locked. For more information about customizing process templates, click 'Help'.". When I searched for this error message, I found this resource. In case this link does not work in the future, it said "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". So in the ProcessTemplate.xml file make sure you give it a unique value in the "name" element and a unique GUID in the "type" attribute of the "version" element. You can generate a unique GUID using Visual Studio tools under TOOLS -> Create GUID. After making these changes I was able to successfully upload the process template using Visual Studio 2015 (I didn't try VS 2013, but I would assume it would work too after making my suggested updates).

-1
votes

Additional Info: you have to take VS2015. I changed the ID and Name and tried the upload with VS2013 and got the same error. With VS2015 it worked like a charm.