Visual Studio:多个构建后命令? [英] Visual Studio: Multiple post-build commands?

查看:18
本文介绍了Visual Studio:多个构建后命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2008 允许我声明一个命令并将其附加到项目的构建后事件.像很多开发人员一样,我经常使用它来将文件 xcopy 到应用程序输出目录.

我正在处理一个项目,我需要将文件从两个不同的地方 xcopy 到两个不同的目的地,所有这些都在一个项目中.换句话说,我需要从同一个构建后事件调用两个不同的 xcopy 命令.看起来构建后事件只需要一个命令,如果我需要调用多个命令,我必须将这些命令放在一个 *.bat 文件中,然后从构建后事件中调用它.

这是正确的,还是有更简单的方法来从构建后事件调用两个命令?预先感谢您的帮助.

解决方案

您可以输入任意数量的构建后命令.只需用换行符将它们分开即可.

这是我的一个项目中的一个例子.

Visual Studio 2008 lets me declare a command and attach it to the post-build event for a project. Like a lot of developers, I use it regularly to xcopy files to the application output directory.

I am working on a project where I need to xcopy files from two different places to two different destinations, all within a single project. In other words, I need to invoke two different xcopy commands from the same post-build event. It looks like the post-build event will only take a single command, and that if I need to invoke multiple commands, I will have to put the commands in a *.bat file and call that from the post-build event.

Is that correct, or is there a simpler way to invoke two commands from the post-build event? Thanks in advance for your help.

解决方案

You can type in as many post build commands as you want. Just separate them by newlines.

Here's an example from one of my projects.

这篇关于Visual Studio:多个构建后命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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