相关疑难解决方法(0)

TFS中的Robocopy构建PowerShell步骤报告失败但没有错误

我的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)

powershell tfs robocopy tfs-2015 azure-devops

5
推荐指数
1
解决办法
2723
查看次数

标签 统计

azure-devops ×1

powershell ×1

robocopy ×1

tfs ×1

tfs-2015 ×1