如何运行Visual Studio生成后事件仅用于调试生成 [英] How to run Visual Studio post-build events for debug build only
本文介绍了如何运行Visual Studio生成后事件仅用于调试生成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将构建后事件限制为仅针对一种构建类型运行?
How can I limit my post-build events to running only for one type of build?
我正在使用事件将DLL文件复制到本地IIS虚拟目录中,但是我不希望这种情况在发布模式下的生成服务器上发生.
I'm using the events to copy DLL files to a local IIS virtual directory, but I don't want this happening on the build server in release mode.
推荐答案
构建前和构建后事件作为批处理脚本运行.您可以在$(ConfigurationName)
上执行条件语句.
Pre- and Post-Build Events run as a batch script. You can do a conditional statement on $(ConfigurationName)
.
例如
if $(ConfigurationName) == Debug xcopy something somewhere
这篇关于如何运行Visual Studio生成后事件仅用于调试生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文