3
votes

I've seen other issues documented regarding SSIS project build failures but nothing that fits my scenario.

I am attempting to build an SSIS project (.dtproj) on a self hosted agent.

The project builds fine in Visual Studio 2019 and also on Azure Pipelines, but when I attempt to build it with the self hosted agent (via Command Line Task in a Build Pipeline in Azure DevOps) I get the following errors:

[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\2.151.2\cmdline.ps1.
[debug]Loading resource strings from: C:\My Project\agent_work_tasks\CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9\2.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\2.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 Studio\2019\Professional\Common7\IDE\devenv.com" C:\My Project\agent_work\1\s\MySolution.sln /build Development /project C:\My Project\agent_work\1\s\ETL\Integration\MySsisProject\MySsisProject.dtproj' [debug]INPUT_WORKINGDIRECTORY: 'C:\My Project\agent_work\1\s'
[debug]Asserting container path exists: 'C:\My Project\agent_work\1\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\1\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\1\s\MySolution.sln
My Project\agent_work\1\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\2.151.2\cmdline.ps1.

1
Only worked with terrestrial builds of ispac, but the first thing I'd verify is that the SSIS bits are installed for VS 2019. The other generic trouble shooting advice is to remove the space in your "My Project" folder. Yes, it's 2019 and it shouldn't matter and many tools comprehend spaces but the fewer escapes you need to worry about, the better your chances of successbillinkc
Yes Data Tools are installed and everything is working when I build in VS or Azure Pipelines.TrevorBrooks
You were right, it was spaces in the directory name that the agent was running from. Thank you!TrevorBrooks

1 Answers

2
votes

The other generic trouble shooting advice is to remove the space in your "My Project" folder. Yes, it's 2019 and it shouldn't matter and many tools comprehend spaces but the fewer escapes you need to worry about, the better your chances of success.