views:

27

answers:

2

I would like to start an application from a pre-build step. However, I do not want Visual Studio to wait for the application to close.

Basically, I have a simulation engine that I need to start prior to a debugging session.

Is this possible? I tried commands like "start app.exe" and "cmd start app.exe"...

+1  A: 

Is "start /b" what you're looking for? It starts the command and returns immediately.

C:\>start /b ping stackoverflow.com

C:\>
Pinging stackoverflow.com [69.59.196.211] with 32 bytes of data:
Reply from 69.59.196.211: bytes=32 time=153ms TTL=44

C:\>Reply from 69.59.196.211: bytes=32 time=153ms TTL=44

C:\>Reply from 69.59.196.211: bytes=32 time=153ms TTL=44

C:\>
C:\>Reply from 69.59.196.211: bytes=32 time=154ms TTL=44

Ping statistics for 69.59.196.211:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 153ms, Maximum = 154ms, Average = 153ms

C:\>
Nestor
This only works from the command line. I was hoping to find a way to do this from Visual Studio build step.
Scott P
The command for your build step would be: cmd /c "start /b ping stackoverflow.com"
Nestor
A: 

This is how I ended up doing this.

It was kind of a "duh" moment, but I created a simple console application that starts a process and returns.

Thanks to Eugene for the suggestion.

Scott P