Hi
I recently had that problem too. It turned out the cl.exe wasn't in the PATH.
@Nick:
Hi, I hope you're doing well.
The problem here is that the capturing of the std and err out streams isn't working properly after launching the process. I wrote this as a fix (it lacks the timeout code, it was just meant as a quick fix):
I recently had that problem too. It turned out the cl.exe wasn't in the PATH.
@Nick:
Hi, I hope you're doing well.
The problem here is that the capturing of the std and err out streams isn't working properly after launching the process. I wrote this as a fix (it lacks the timeout code, it was just meant as a quick fix):
...
process.Start();
string standardOutput = null;
string standardError = null;
using (Task processWaiter = Task.Factory.StartNew(() => process.WaitForExit()))
using (Task<string> outputReader = Task.Factory.StartNew(() => process.StandardOutput.ReadToEnd()))
using (Task<string> errorReader = Task.Factory.StartNew(() => process.StandardError.ReadToEnd()))
{
Task.WaitAll(processWaiter, outputReader, errorReader);
standardOutput = outputReader.Result;
standardError = errorReader.Result;
}
if (process.ExitCode != 0)
{
...
Now this uses the Task Parallelism features of 4.5 (I'm running cudafy in 4.5), which mightn't be what you need, but at least you have a starting point. Check for instance this article: http://alabaxblog.info/2013/06/redirectstandardoutput-beginoutputreadline-pattern-broken/