简体   繁体   中英

Custom TFS 2015 Build Activity with output variable

Is there a way with the new build system in TFS 2015 to pass an output parameter from a build activity?

I currently would like to set the variable used for the Begin SonarQube Task to be the assembly version value in the AssemblyInfo.cs file. I can easily get the value, but I don't see a way to pass that information back to the build process to use in the next step. Currently I need to remember to update the value in the build definition. Thanks

You should be able to use the task output command to set variables from powershell tasks

Something like this:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM