Search code examples
msdeploy

Remove MS deploye warning "exited with code 0x0"


In runCommand of MSDdeploy, we get following warning

Warning: The process 'C:\Windows\system32\cmd.exe' (command line '') exited with code '0x0'.

The command is

Package\OurProject.csproj.deploy.cmd 
  [some other options] 
  "-postSync:runCommand='powershell -inputformat none c:\AfterDeploy.ps1'"

Solution

  • You have to add parameter successReturnCodes, e.g. successReturnCodes=0.

    e.g.

    Package\OurProject.csproj.deploy.cmd 
      [some other options] 
      "-postSync:runCommand='powershell -inputformat none c:\AfterDeploy.ps1',successReturnCodes=0"
    

    See Web Deploy runCommand Provider