在Visual Studio构建事件上运行bat文件 [英] Run a bat file on Visual Studio build event

查看:1086
本文介绍了在Visual Studio构建事件上运行bat文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想在项目构建中运行bat文件。所以我按如下方式设置预构建事件命令行。



Hi all,

I want to run a bat file on my project build. So I set the pre-build event command line as follows.

$(ProjectDir)\build.bat





然而,似乎没有用。任何人都可以给我一个线索来解决它。



顺便说一句,我使用的是VS 2008,该项目是C#console app。



提前谢谢。



However, seems it is not working. Can anybody give me a clue to solve it.

BTW, I am using VS 2008 and the project is C# console app.

Thanks in advance.

推荐答案

(ProjectDir)\ build.bat
(ProjectDir)\build.bat





然而,似乎它不起作用。任何人都可以给我一个线索来解决它。



顺便说一句,我使用的是VS 2008,该项目是C#console app。



提前谢谢。



However, seems it is not working. Can anybody give me a clue to solve it.

BTW, I am using VS 2008 and the project is C# console app.

Thanks in advance.


它无法正常工作

这给了我们绝对没有任何意义。



我建议您编辑项目,以便事件显示:

it is not working
This gives us absolutely nothing to go on.

I would suggest you edit your project so the event reads:
echo


(ProjectDir)\ build.bat
(ProjectDir)\build.bat



这应该可以帮助你弄清楚可能发生的事情。您还应检查构建输出屏幕并记录任何错误或警告消息。


That should help you to figure out what may be happening. You should also check your build output screen and logs for any error or warning messages.


这篇关于在Visual Studio构建事件上运行bat文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆