View Complete Thread
  • MSDeploy Return Codes

    Jan 16, 2015 06:16 AM|jeanie77|LINK

    I'm writing a follow up to a question asked by RSchaefer on this forum: https://social.msdn.microsoft.com/Forums/vstudio/en-US/9fff2533-7e8f-452e-9a2b-ab1a40d01648/msdeploy-cmd-file-built-by-msbuild-does-not-return-msdeploy-rc?forum=msbuild

    I would like to ask MSDeploy's team to modify the CMD file generated by MSBuild, to return a significant error code in case of deployment failures.

    Here is the description of the problem:

    We're running MSBuild with DeployOnBuild=True and CreatePackageOnPublish=True to create a deployable package we can store for later deployment. These options also create a .CMD file that one can theoretically use to run MSDeploy. The problem is that if MSDeploy fails the .CMD file still returns an RC of 0. I'm running this in a scripted workflow solution and if the .CMD file returns 0 then it assumes everything worked (logical) when in fact the MSDeploy may have failed. The only way to know is to check the log.

    Thank you, Valentina

    msdeploy msbuild ERRORLEVEL returncode