Friday, April 5, 2013

Post-build Event Command Line Visual Studio

So, I'm working with the post-build event command line in Visual Studio. Specifically, I want to move all of my newly compiled dlls to another directory due to testing a plugin. The end result is that everything worked. But, I had to go back into the DOS world. Enough of the chat... here's my line

copy "C:\TFS\postbuildevent\bin\Debug\*.*" "C:\newdirectory\" /Y

Why the quotes? Visual Studio needs the quotes around the longer directory names and those with spaces. If you don't use the quotes, you will get a file not found error. Also, I wanted to avoid the prompt for copying files, therefore, I used the /Y flag at the end.

If you want to test beforehand, open the command window... cmd.exe.

No comments: