我的powershell脚本运行时没有在日志文件中报告错误,但TFS 2015构建步骤报告错误.我需要进行特殊回拨吗?
这是一种新的样式构建,而不是基于XAML的构建.
脚本没有什么特别之处,它称为robocopy,它成功发生.
这是脚本:
[CmdletBinding()]
param (
[string]$localWorkspace,
[string]$destination
)
begin{}
process
{
try
{
## Script
$ServiceDirs = Get-ChildItem $localWorkspace -Recurse | ?{ $_.PSIsContainer -eq $True -and $_.Name -match "^Service$" } | % { $_.FullName }
$serviceCollection = @{}
foreach ($Service in $ServiceDirs)
{
$ServiceName = Get-ChildItem $Service | ?{$_.Name -match ".*\.csproj$" } | % { $_.BaseName }
$binpath = ($service + "\bin\release")
$serviceCollection.Add($serviceName , $binpath)
}
$serviceCollection.GetEnumerator() | % {
Write-Verbose "Processing service: $($_.key)"
$currentDestination = ($destination …Run Code Online (Sandbox Code Playgroud)