none
TFS 2010: Pass updated argument to new build

    Question

  • For our product, we have set up a chain of builds that need to be run in sequence, and for that we use Community TFS Build Extensions QueueBuild activity. The process itself works great, and we can pass processparameters between the builds using that argument. Having snatched that solution from 'somewhere', this is how the argument is populated:

    Microsoft.TeamFoundation.Build.Workflow.WorkflowHelpers.SerializeProcessParameters(New Dictionary(Of String, Object) From {
    {"ParentBuildUri", BuildDetail.Uri},
    {"Verbosity", Verbosity},
    {"CleanWorkspace", CleanWorkspace},
    {"AssociatedEmails", AssociatedEmails}
    })

    Most arguments are passed along to the new build just like they should, but we have a problem with the last one, AssociatedEmails. This one is updated during the build process with values from the associatedChangesets. (The idea is that if a build breaks later in the chain, each user associated with any of the previous builds is 'suspect' of breaking the build). 

    The parameter is defined as an In/Out string, and I have checked that it has its value updated during the build. But the updated values are never passed along, only any 'original' value the parameter may have. Does anybody know why I can't pass along the updated value, or suggest any other solution to this problem?

    UPDATE: Found a paragraph in an entry on Jason Prickett's blog that think may be the cause: the order in which arguments receive their values. I have since tried leaving this particular argument unassigned from the build definition, and then programmatically assign the correct values. But that didn't seem to work either; it seems to me from inspecting the build logs as if the value is never passed along (while the other arguments receive their values like they should) - or that it always passes along the initial value, even when this is null.



    Thursday, June 21, 2012 12:02 PM

Answers

All replies