SSIS 项目无法在自托管代理上构建

SSIS Project Fails To Build On Self Hosted Agent

我已经看到其他有关 SSIS 项目构建失败的问题,但没有一个适合我的情况。

我正在尝试在自托管代理上构建 SSIS 项目 (.dtproj)。

该项目在 Visual Studio 2019 年以及 Azure Pipelines 上构建良好,但是当我尝试使用自托管代理构建它时(通过 Azure DevOps 中的构建管道中的命令行任务)我得到了以下错误:

[debug]Evaluating condition for step: 'Build SSIS Packages'
[debug]Evaluating: succeeded()
[debug]Evaluating succeeded:
[debug]=> True
[debug]Result: True Starting: Build SSIS Packages
======================================================================== Task : Command line
Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version: 2.151.2
Author: Microsoft Corporation

========================================================================= [debug]VstsTaskSdk 0.9.0 commit 6c48b16164b9a1c9548776ad2062dad5cd543352 [debug]Entering C:\My Project\agent_work_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9.151.2\cmdline.ps1.
[debug]Loading resource strings from: C:\My Project\agent_work_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9.151.2\task.json
[debug]Loaded 6 strings.
[debug]SYSTEM_CULTURE: 'en-US'
[debug]Loading resource strings from: C:\My Project\agent_work_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9.151.2\Strings\resources.resjson\en-US\resources.resjson
[debug]Loaded 6 strings.
[debug]INPUT_FAILONSTDERR: 'false'
[debug] Converted to bool: False
[debug]INPUT_SCRIPT: 'echo Building SsisProject...
[debug]
[debug]"C:\Program Files (x86)\Microsoft Visual Studio19\Professional\Common7\IDE\devenv.com" C:\My Project\agent_work\s\MySolution.sln /build Development /project C:\My Project\agent_work\s\ETL\Integration\MySsisProject\MySsisProject.dtproj' [debug]INPUT_WORKINGDIRECTORY: 'C:\My Project\agent_work\s'
[debug]Asserting container path exists: 'C:\My Project\agent_work\s'
Generating script.
[debug]AGENT_VERSION: '2.155.1'
[debug]AGENT_TEMPDIRECTORY: 'C:\My Project\agent_work_temp'
[debug]Asserting container path exists: 'C:\My Project\agent_work_temp'
[debug]Asserting leaf path exists: 'C:\WINDOWS\system32\cmd.exe'

========================== Starting Command Output ========================
[debug]Entering Invoke-VstsTool.
[debug] Arguments: '/D /E:ON /V:OFF /S /C "CALL "C:\My Project\agent_work_temp\dde3e815-8cea-4bea-ab26-77e9bb52d973.cmd""'
[debug] FileName: 'C:\WINDOWS\system32\cmd.exe'
[debug] WorkingDirectory: 'C:\My Project\agent_work\s' "C:\WINDOWS\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "C:\My Project\agent_work_temp\dde3e815-8cea-4bea-ab26-77e9bb52d973.cmd""
Building SsisProject...

Microsoft Visual Studio 2019 Version 16.0.29306.81. Copyright (C) Microsoft Corp. All rights reserved.

The following files were specified on the command line:

C:\My Project\agent_work\s\MySolution.sln
My Project\agent_work\s\ETL\Integration\MySsisProject\MySsisProject.dtproj

[debug]Exit code: 1
[debug]Leaving Invoke-VstsTool.
[error]Cmd.exe exited with code '1'.
[debug]Processed: ##vso[task.logissue type=error]Cmd.exe exited with code '1'.
[debug]Processed: ##vso[task.complete result=Failed]Error detected
[debug]Leaving C:\My Project\agent_work_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9.151.2\cmdline.ps1.

另一个通用的故障排除建议是删除 "My Project" 文件夹中的 space。是的,现在是 2019 年,这应该无关紧要,许多工具都可以理解 space,但您需要担心的越狱越少,成功的机会就越大。