1

I would like to upload a custom process template(zip file) through C# code to TFS I've been searching through the documentation but couldn't really find any proper way or rather any way to do it from pure c# code (I would rather not use power shell script) I use the built-in method that should be uploading the process template but its just won't work!

Thanks in forward!

BlaBlaBla
  • 23
  • 3

2 Answers2

1

Yes, it is possible write c# program which execute witadmin.exe in console with needed parameters and upload process configuration file. About witadmin you can find information here: Import and export process configuration. How run witadmin.exe from c# code you can find information here: Run an exe from C# code

Stanislav Machel
  • 349
  • 2
  • 20
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.

Get the IProcessTemplates instance from a TfsTeamProjectCollection instance with the GetService<<T>T>() method.

double-beep
  • 5,031
  • 17
  • 33
  • 41