TFS 2015 Build Variable Expansion

Viewed 869

We have a VNext build definition, on the Variables tab we have added a few custom variables. In one of the variable values we refer to another variable, i.e.

FileDescription = $(Build.DefinitionName)

However it appears that when we reference it in a PowerShell script the FILEDESCRIPTION environment variable exists but the value is not expanded(it contains "$(Build.DefinitionName)" ) and is treated as a string literal.

The documentation appears to suggest that we should be able to refer to it and it will be subsituted at run-time - https://msdn.microsoft.com/en-us/library/vs/alm/build/scripts/variables

Is there a way to get TFS to automatically expand the variable at runtime?

1 Answers
Related