Reputation: 341
I have embedded a powershell script in my build process template, and I wish to pass the build number format to it as a parameter.
The build number format is a VBScript expression:
$(BuildDefinitionName)_$(Date:yyyyMMdd)_$(Rev:.r)
The arguments I am passing to the powershell script have the following expression:
String.Format(" ""& '{0}' '{1}' "" ", MyScriptFileName, BuildNumberFormat.ToString())
But at runtime, I see that the value is the literal
$(BuildDefinitionName)_$(Date:yyyyMMdd)_$(Rev:.r)
I need it in a form like 'DEV_20140520.2'
I am using TFS 2010. Any ideas how to get it in the right format?
Upvotes: 1
Views: 470
Reputation: 341
Ok, I sorted it out myself, instead of BuildNumberFormat.ToString()
, I used the property BuildDetail.BuildNumber
Upvotes: 1