TFS 2018通过C#上传过程模板

时间:2018-12-05 09:09:46

标签: c# tfs tfs-process-template

我想通过C#代码将自定义流程模板(zip文件)上传到TFS,我一直在搜索文档,但实际上找不到任何合适的方法,或者根本无法从纯c#代码中做到这一点(我宁愿不使用Power Shell脚本)我使用应该上载流程模板的内置方法,但它根本无法工作!

感谢前进!

2 个答案:

答案 0 :(得分:1)

是的,可以编写带有所需参数并在控制台中执行witadmin.exe并上传过程配置文件的c#程序。关于witadmin,您可以在这里找到信息:Run an exe from C# code。如何从C#代码运行witadmin.exe,您可以在这里找到信息:{{3}}

答案 1 :(得分:0)

IProcessTemplates.AddUpdateTemplate():
name: get it from the ProcessTemplate.xml
description: same
metadata: the OuterXml node of the metadata node
state: "Visible"
zipFileName: I prefer the full path to the zip file.

使用IProcessTemplates方法从TfsTeamProjectCollection实例中获取GetService<<T>T>()实例。

相关问题