I would like to get and then edit, programmatically, all of the process paramater metadata from a TFS build definition. Does anyone know how to do that? Thank you.
Asked
Active
Viewed 1,857 times
1 Answers
1
It depends on what you are after, many of the standard build properties can be set using the TFS Team Project Manager application, available on CodePlex.
Updated based on comments below.
You need to use the TFS API. There's a good intro here. If you need to set custom attributes, you can modify the ProcessParameters
(and MSDN)
The ProcessParameter
s only has entries when the parameter is different to the Default. Try editing an existing build definition and changing a setting to a non-default value. The BuildSettings
has the path to the Solution to be built and the configuration to use. This is probably where you want to edit the path to match your branch. Also you need to change the Workspace.Mappings
property on the new build definition.

DaveShaw
- 52,123
- 16
- 112
- 141
-
Thank you. I am extending VS2010 so that when we want to branch, you can click a menu item and a custom UI will display that will allow you branch. Then, in the same UI, you have the option to create a new build definition. It prompts you for a template to use, and it makes the new definition. I have all that working. What I want to do next is that after the above is done, another UI will show with all of the paramaters and metadata from the new definition and allow you to enter the missing, required arguments and alter any other ones you want. I tried the above already. Next comment... – user1475722 Jun 22 '12 at 20:19
-
All it gave me was one process parameter, which is called 'BuildSettings' There are a lot more in the definition, they just aren't showing?! Can you please help? I want the user to be able to do all of this from one place, that's why I am writing a custom extension. – user1475722 Jun 22 '12 at 20:20