Alex Rivera | Logout

Run batch script before Debugging

Asked 2011-03-15T03:45:49.280
14

I want to run a batch script every time before starting program for debugging.

For the build events, such functionality is realized using pre-build event, post-build event.

For actual debugging, I could not find any pre-Debug, post-Debug events.

How to realize this scenario?

I am using VS2008, .net framework 3.5, c# application.

I am opposed to idea of creating some extra lines of code within the application that would fire-up external batch file.

Edit
Report

1 Answer

-3

So, you have a .bat file that you want to run via the pre-build event? Try to specify full path to your batch file in the pre-build event command e.g.

cmd /c C:\Path\to\foo.bat

or

cmd C:\windows\system32\cmd.exe /c C:\Path\to\foo.bat
answered 2011-05-11T04:24:04.010

Your Answer