Home Ask Login Register

Developers Planet

Your answer is one click away!

Ivan February 2016

VSTS builds - how to define new variable in custom build step and pass to next build steps

We are using VSTS to build our VS solution.

Is there a way to define custom Build Step, for example a PowerShell script, that creates a new variable to be passed to further build steps?

There's nothing about it in MSDN: https://msdn.microsoft.com/Library/vs/alm/Build/scripts/variables


Eddie - MSFT February 2016

You can use Task Logging Commands to do this.

To invoke a logging command, simply emit the command via standard output. For example, from a PowerShell task:

"##vso[task.setvariable variable=testvar;]testvalue"

Post Status

Asked in February 2016
Viewed 2,829 times
Voted 7
Answered 1 times


Leave an answer

Quote of the day: live life