0

I'm using MSBuild Visual Studio 2013 Express, and try to kill the vstest.console.exe process, if it is not initialized is giving error.

How do I stop the command and not have an error when the process is not initialized.

Code:

<exec  program="taskkill" commandline="/f /im vstest.console.exe" />

Error:

External Program Failed: taskkill (return code was 128)
mtsys
  • 249
  • 1
  • 4
  • 15

1 Answers1

0

You can use IgnoreExitCode parameter to ignore non-zero exit codes.

<exec  program="taskkill" commandline="/f /im vstest.console.exe"
       IgnoreExitCode="true"/>
Hamlet Hakobyan
  • 32,965
  • 6
  • 52
  • 68