Visual Studio: Multiple post-build commands?

David Veeneman picture David Veeneman · Jan 2, 2010 · Viewed 73.8k times · Source

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.

Answer

womp picture womp · Jan 2, 2010

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.

Post Build Event Commandline