Merge pull request #78 from microsoft/user/ryanbod/fix_killtask_warning

Ignoring 128 errors from taskkill
This commit is contained in:
ryanbodrug-microsoft 2020-04-09 09:41:00 -07:00 committed by GitHub
commit 154e5aab8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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>