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

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

问题描述

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

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.

我正在一个项目中,我需要从两个不同的地方对文件进行xcopy到两个不同的目的地,都在一个项目中。换句话说,我需要从同一构建后事件中调用两个不同的xcopy命令。看起来,构建后事件仅需要一个命令,并且如果我需要调用多个命令,则必须将这些命令放在* .bat文件中,并从构建后事件中调用它。

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天全站免登陆