TFS 2015:上传自定义流程模板时的版本错误

3

我基于敏捷流程创建了一个定制化的流程,并已经按照这篇帖子中提到的所有规定步骤进行了操作:TFS 2015无法上传自定义流程模板,但是当我将版本类型更改为其他内容时,在上传过程中会收到以下错误提示:

Time: 2016-04-21T08:37:48
Module: Template Importer
Exception Message: The remote server returned an error: (400) Bad Request. (type WebException)Status: ProtocolError
Response Status Code: BadRequest
Response Status Message: VS402452: The process template did not specify a version, or specified an invalid version

Exception Stack Trace:    at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.TeamFoundation.Framework.Client.TeamFoundationProcessTemplateService.AddUpdateTemplate(String name, String description, String metadata, String state, String zipFileName)
   at Microsoft.VisualStudio.TeamFoundation.PCW.TemplateManagementService.UpLoadTemplateFile(TemplateData data, FileInfo templateZipFile, ELeadLogger log)
   at Microsoft.VisualStudio.TeamFoundation.PCW.TemplateManagementService.Import(String folderPath, ILogHandler logHandler)

是否有“可接受”的版本类型列表?TFS 2015的MSDN文档指出,通过上传自定义流程模板,它不会触及任何现有流程,但这个错误似乎与这一概念相矛盾。

有什么想法吗?已经在这个问题上纠结了一天,一旦解决了这个障碍,其他所有东西都准备就绪。谢谢!


你在流程模板中指定了哪个版本?在 ProcessTemplate.xml 文件中,有一个 version 元素,应该长这样:<version type="ADCC42AB-9882-485E-A3ED-7678F01F66BC" major="14" minor="1" /> - Daniel Mann
1个回答

3

随着TFS 2013更新3或4的发布,默认模板已被锁定。因此,现在您需要更改类型GUID以使其对您的模板和名称唯一。

您将在Process Template文件夹的根目录中找到过程模板版本:ProcessTemplate.xml

<?xml version="1.0" encoding="utf-8"?>
<ProcessTemplate>
  <metadata>
    <name>Scrum 2015</name>
    <description>This template is for teams who follow the Scrum framework.</description>
    <version type="6B724908-EF14-45CF-84F8-768B5384DA46" major="3" minor="33" />
    <plugins>
    ...
  ... 
...

如果你的模板没有这个标签,你需要添加它。

如果你创建了自定义模板,你还需要使用自己的值覆盖GUID和名称,这样就能解锁了。

<?xml version="1.0" encoding="utf-8"?>
<ProcessTemplate>
  <metadata>
    <!-- new name -->
    <name>Custom Scrum 2015</name>
    <description>This template is for teams who follow the Scrum framework.</description>
    <!-- add/override version and set a new guid -->
    <version type="276d0f20-c2f9-4077-8199-e81a8cc47012" major="1" minor="0" />
    <plugins>
    ...
  ... 
...

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接