none
Process 'msbuild.exe' exited with code '1' RRS feed

  • Question

  • I am building a project with TFS through MSBuild Task which is executing with the build Agent. Though Project is getting build with Zero error and then Task is Failing after completing successfully build with One single line Error message "Process 'msbuild.exe' exited with code '1'.".

    And my same project is getting build with the command line(all included parameters which is passing while TFS

    build) on the same build machine.

    As we can see there is an issue with Powershell script execution which is autogenerated to run build machine tasks.

    but I am not able to find the problem..!

    Environment Setup-

    TFS2018(on premises) on The same network.

    Build Agent-VS2015Express Web/Windows,

     os-Windows Server2012 R2 Standard,

    Build Agent Version - <g class="gr_ gr_419 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="419" id="419">vsts</g>-agent-win-x64-2.136.1.

    My Error Log - 

    30 Warning(s)
    0 Error(s)
    Time Elapsed 00:00:36.27
    Exit code: 1
    Error record:
    Invoke-VstsTool : Process 'msbuild.exe' exited with code '1'.
    At E:\DevOps\agent\vsts-agent-win-x64-2.136.1\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.120.0\ps_modules\MSBuildHelpers\InvokeFunctions.ps1:111 char:13
    + Invoke-VstsTool -FileName $MSBuildPath -Arguments $arguments -Requir ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-VstsTool
    Script stack trace:
    at Invoke-Tool, E:\DevOps\agent\vsts-agent-win-x64-2.136.1\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.120.0\ps_modules\VstsTaskSdk\ToolFunctions.ps1: line 86
    at Invoke-MSBuild, E:\DevOps\agent\vsts-agent-win-x64-2.136.1\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.120.0\ps_modules\MSBuildHelpers\InvokeFunctions.ps1: line 111
    at Invoke-BuildTools, E:\DevOps\agent\vsts-agent-win-x64-2.136.1\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.120.0\ps_modules\MSBuildHelpers\InvokeFunctions.ps1: line 36
    at <ScriptBlock>, E:\DevOps\agent\vsts-agent-win-x64-2.136.1\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.120.0\MSBuild.ps1: line 43
    at <ScriptBlock>, <No file>: line 1
    at <ScriptBlock>, <No file>: line 22
    at <ScriptBlock>, <No file>: line 18
    at <ScriptBlock>, <No file>: line 1
    Exception:
    Microsoft.PowerShell.Commands.WriteErrorException: Process 'msbuild.exe' exited with code '1'.
    Process 'msbuild.exe' exited with code '1'.
    Processed: ##vso[task.logissue type=error]Process 'msbuild.exe' exited with code '1'.
    Leaving Invoke-VstsTool.
    Processed: ##vso[task.complete result=Failed]
    Leaving Invoke-MSBuild.
    Leaving Invoke-BuildTools.
    Leaving E:\DevOps\agent\vsts-agent-win-x64-2.136.1\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.120.0\MSBuild.ps1.
    ******************************************************************************
    Finishing: Build solution
    ******************************************************************************
    Evaluating condition for step: 'Post Job Cleanup'
    Evaluating: AlwaysNode()
    Evaluating AlwaysNode:
    => True
    Result: True

    Thanks in Advance ..!!

    • Edited by DarshanaK90 Thursday, October 25, 2018 12:51 PM
    • Changed type DarshanaK90 Friday, October 26, 2018 3:57 AM
    • Changed type DarshanaK90 Friday, October 26, 2018 6:41 AM
    Thursday, October 25, 2018 12:50 PM

All replies

  • Hi, did you had any luck in solving this issue?
    Wednesday, March 6, 2019 8:33 PM
  • Hi, 

    I am getting the same issue in Azure DevOps build pipeline. Any one solving this issue?
    Thursday, April 4, 2019 1:45 PM
  • Trata de averiguar si estan usando agentes privados, en esos agentes buscar que tengan las configuraciones de los variables de atributos donde se encuentre el msbuild.

    Tuesday, September 17, 2019 5:58 PM
  • Hi, I'm facing the same issue in Azure DevOps Build pipeline. 
    Wednesday, October 2, 2019 11:18 AM