We have a custom build process (not using MS Build) and during that process I am adding a “fake” build to the global builds list. The reason I am doing that is so that you can select the build for a given work item (found in build). We have a custom field, build included, which is intended to show which build that work item was fixed in. I am having trouble figuring out how to update this field programmatically. The idea is I will have a small app that does this that I will call during the build process, finding all work items since the last build, then updating the field for those work items. Any ideas?
Share
Something like this should work for you:
An example of calling this would be:
The variable
fieldToUpdateshould be the name of the field, not the refname (ie. Integration Build, not Microsoft.VSTS.Build.IntegrationBuild)You could probably get away with using PartialOpen(), but I am not sure.
You will probably need to add
Microsoft.TeamFoundation.Clientto your project. (And maybeMicrosoft.TeamFoundation.Common)