我们可以在Visual Studio的构建后事件命令行中执行.bat文件吗? [英] Can we execute a .bat file in post build event command line in visual studio?
本文介绍了我们可以在Visual Studio的构建后事件命令行中执行.bat文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以在Visual Studio的构建后事件命令行中执行.bat文件吗?
Can we execute a .bat file in post build event command line in visual studio?
推荐答案
当然,这是一个示例:
call "$(SolutionDir)scripts\copyifnewer.bat" "$(SolutionDir)libs\RLPL.Services.CertificateValidator.Basic.dll" "$(TargetDir)RLPL.Services.CertificateValidator.Basic.dll"
call "$(SolutionDir)scripts\copyifnewer.bat" "$(SolutionDir)libs\RLPL.Services.CertificateValidator.Common.dll" "$(TargetDir)RLPL.Services.CertificateValidator.Common.dll"
请注意您可能遇到的两个可能的问题:
Just be aware of two possible issues you might have:
-
用双引号引起来(请参阅每个部分如何用
"
符号包围)
如果要调用2个或更多批处理文件,请确保使用call
命令,否则将很难找到为什么第二只蝙蝠没有执行任务的原因
if you want to call 2 or more batch files make sure you use call
command otherwise you'll have a trouble finding why the second bat is not doing its job
这篇关于我们可以在Visual Studio的构建后事件命令行中执行.bat文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文