I am using VS2013. I am running a build definition based on the TfvcTemplate.12.xaml build template on a local build server. I am trying to pass the value of a Visual Studio macro to a pre-test PowerShell 3.0 script.
My script currently only logs the value passed. It looks like
Param(
[string]$MyParam
)
$MyParam | Out-File -FilePath 'C:\ProgramData\Company\PS.log' -Append
The Pre-test script arguments field contains -MyParam $(ProjectDir) I expected the ProjectDir macro would be translated to the actual directory, but the literal string $(ProjectDir) is logged.
My question is: how can I use the value of the VS macro variables in my pre-test script?
Thanks, PC