Execute Batch File After Tfs Build Errors

Execute Batch File After Tfs Build Errors 5,7/10 9456reviews
See More On Stackoverflow

I'm trying to execute a batch file during a pre-build event. I have a new project and have added foo.bat to it. The file contains the following line: echo bar When I set the pre-build event command line to foo.bat, I get the following error: The command 'foo.bat' exited with code 9009. When I set the pre-build event command line to call foo.bat, I get the following error: The command 'call foo.bat' exited with code 1. Everything I've read related to those codes generally indicates that there is a problem with the contents of the batch file (not likely in this case) or that the system cannot find the batch file.

The batch file works fine from a command prompt. Ship World File Starbound Pets. Things I've tried already: Created the file using different tools, various encodings, placing exit 0 in the file, different build actions for the file, and copying the file to the output directory. All with no luck. What am I missing? It has to be something simple.