TFS构建系统

时间:2016-02-24 17:17:38

标签: powershell tfs tfsbuild azure-devops

我已在Visual Studio Team Services(Visual Studio Online)构建中设置了构建定义。

以下是Powershell脚本设置的快照: enter image description here

我没有在'工作文件夹'中设置任何内容,因为我假设它默认为脚本所在的文件夹,如信息中所指定。

当构建运行时,它会在Powershell步骤中抛出异常。

以下是错误快照: enter image description here

工作文件夹不是脚本所在的文件夹。 有什么建议可以解决吗?

1 个答案:

答案 0 :(得分:4)

使用powershell变量$ PSScriptRoot获取脚本所在的目录,并使用它来找出所有其他路径。