Closed gellmaster closed 7 years ago
Any update on this? I am also looking to replace using pre-defined variables instead of having to define values in the Configuration Json.
Try replacing the underscores inside the variable name with periods.
<add key="BuildDefinition" value="__Build.DefinitionName__"/>
<add key="FinishTime" value="__Build.BuildNumber__"/>
This is how we use it, and it works fine.
Sorry for the delay.
That did the trick! I still haven’t found documentation that clearly highlights this exact format, so thank you @devingoble for taking your time to help.
It seems the “Azure App Service Deploy” v3 task has similar functionality that I may explore. It would be nice to see a build only task, like this extension, that is baked in to VSTS. Extensions require a VSTS admin to install and getting approval slowdowns the process of creating a build definition in a new VSTS environment.
I’m exploring the Tokenizer task as a way to surface some build information in my web app by updating a couple web.config app settings.
I am trying to use “BUILD_BUILDNUMBER” and “BUILD_SOURCEVERSION” in the web.config. I am not using configuration json. As best as I can tell it seems predefined variables are not included for replacement, only user defined. Is this accurate or am I not doing something correctly?
If predefined variables are not included, please consider this an enhancement request as I could see other reasons to utilize the various predefined variables at build or release time.
Thanks in advance for your help!
Log output from task: