Ignoring 128 errors from taskkill, as this means the process isn't running. We don't want htis to show up in the warnings list on build

This commit is contained in:
ryanbodrug-microsoft 2020-04-08 11:19:28 -07:00
parent 0648ecf2d2
commit 124e0412b2

View file

@ -2,7 +2,13 @@
<Target Name="KillPowerLauncher" BeforeTargets="PreBuildEvent;BeforeClean">
<Message Text="Killing process 'PowerLauncher.exe'" Importance="normal" ContinueOnError="true" />
<Exec Command="taskkill /f /im PowerLauncher.exe" ContinueOnError="true"/>
<Exec Command="taskkill /F /IM PowerLauncher.exe"
IgnoreExitCode="true"
IgnoreStandardErrorWarningFormat="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
</Exec>
<Error Text="Cannot kill PowerLauncher.exe process." Condition="$(ErrorCode) == 1"/>
<Message Text="Process PowerLauncher.exe does not exist." Condition="$(ErrorCode) == 128"/>
</Target>
</Project>