16

I have a pre-build event defined like this:

$(ProjectDir)PreBuild\runthis.exe

When the runthis.exe executes, it runs in the context of the bin folder of my project instead of the PreBuild folder where it lives. How can I make the build event execute runthis.exe in the context of the PreBuild folder instead of the bin folder?

Rafe
  • 8,467
  • 8
  • 47
  • 67

1 Answers1

24

Add cd $(ProjectDir)PreBuild first to switch to that folder.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964