TFS build powershell script step: Unable to access variable $ (Date: yyyyMMdd)

I created the steps for automatic deployment using the TFS vNextbuild system . In one step, I need to access $(Date:yyyyMMdd)version versions of some files.

Below you can find a fragment of the configuration and errors:

Configuration for power shell script step

Error queuing

So, any idea how to access date-related variables as an argument in a PowerShell script step?

+4
source share
2 answers

"$ (Date: yyyyMMdd)" token , variable. .

- " " "" "$ (: yyyyMMdd)", "$ (Build.BuildNumber)" "$ (: YYyyMmDd)". $(Build.BuildNumber) .

+8

, date . -fileName CompressFile script :

Param(
    [string]$fileName = 'Package{0}' -f (Get-Date).ToString('yyyyMMdd')
)

TFS VNext ( ).

0

All Articles