We use TeamCity to run our acceptance tests from a command line application. TeamCity simple has a build step to run a .Net executable which in turn will run a command line utility for each test. Previously this was done sequentially, i.e. a process would be launched to run the test and the master process would wait for each one to finish before continuing to the next one. However to try and improve the efficiency of this I've wrapped this in a parallel.ForEach so multiple tests can be run at once. Locally this runs absolutely fine with lots of console windows popping up. However when run in the TeamCity build agent all but one of the processes that are launched in parallel end up hanging. When run through the TeamCity agent this is all in a windows service so its very hard to find out what is actually going on.
The processes are all launched using the Process.Start .Net api and calling WaitForExit.
Does anyone have any suggestions as to what might be going on or any potential workarounds?