[英]How do I suppress the following commands from throwing errors on a pre-build event?
I have tried piping the following two calls to NUL with no luck: 我已经尝试将以下两个调用传递给NUL而没有运气:
net stop "Logging Service">nul 2>&1
taskkill /IM LogServiceHost.exe /f >nul 2>&1
They will stop my build cycle from going through: 他们将阻止我的构建周期通过:
Error 1 The command "
net stop "Logging Service">nul 2>&1
taskkill /IM LogServiceHost.exe /f >nul 2>&1" exited with code 128. LoggingUtilities
Any ideas how I can just fire these prebuild events and not care what they return, and not have it ever suppress my build? 任何想法我怎么可以解雇这些预建事件而不关心他们返回什么,而不是让它压制我的构建?
Try adding the following line at the end of your post-build event. 尝试在构建后事件结束时添加以下行。 This should cause the automatically-generated .bat script to return an ERRORLEVEL 0.
这应该导致自动生成的.bat脚本返回ERRORLEVEL 0。
exit /b 0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.