什么是复位ERRORLEVEL为零时,最简单的方法? [英] What is the easiest way to reset ERRORLEVEL to zero?
本文介绍了什么是复位ERRORLEVEL为零时,最简单的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个运行的C#项目的一些命令的生成后事件。最后的命令有时会导致ERRORLEVEL值不等于零,然后构建失败。
I have a post-build event that runs some commands for a c# project. The last command would sometimes cause the ERRORLEVEL value not equals to zero and then the build fails.
欲追加命令的一个额外的行的错误级别值始终设定为零。什么是最便捷的方式做到这一点?
I want to append an extra line of command to always set the ERRORLEVEL value to zero. What is the most convenient way to do that?
推荐答案
我发现,退出0看起来像一个很好的方式来处理这个问题。
I found that "exit 0" looks like a good way to deal with this problem.
用法示例:
NET STOP UnderDevService / Y
NET STOP UnderDevService /Y
0退出
如果UnderDevService服务未启动。
if the UnderDevService service is not started.
这篇关于什么是复位ERRORLEVEL为零时,最简单的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文