Hi all i am trying to compile a set of source files located in location In the following code sample i am trying to compile a visual c++ 6.0 (dsp) project from a c# application
But for the first process(set path) it gives error :
'proc.ExitCode' threw an exception of type 'System.Invalid OperationExcept ion'
and for the msdev command :
'proc.BasePrior ity' threw an exception of type 'System.Invalid OperationExcept ion'
Any idea where i could be going wrong ?
Thanks a lot ,
Rhitam
Code:
ProcessStartInfo procStartInfo = new System.Diagnostics.ProcessStartInfo("cmd", @"/c set path=%programfiles%\Microsoft Visual Studio\Common\MSDev98\Bin"); procStartInfo.RedirectStandardOutput = true; procStartInfo.UseShellExecute = false; System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo = procStartInfo; proc.Start(); proc.WaitForExit(); procStartInfo = new System.Diagnostics.ProcessStartInfo("cmd", @"/c MSDEV C:\Shared\Source\Binaries\Project\Project.dsp /MAKE /REBUILD >> compilerr.txt"); proc.StartInfo = procStartInfo; procStartInfo.RedirectStandardOutput = true; procStartInfo.UseShellExecute =false; proc.Start();
'proc.ExitCode' threw an exception of type 'System.Invalid OperationExcept ion'
and for the msdev command :
'proc.BasePrior ity' threw an exception of type 'System.Invalid OperationExcept ion'
Any idea where i could be going wrong ?
Thanks a lot ,
Rhitam
Comment