2012-04-10 7 views
0

immer diese Fehlermeldung: Ungültige Option Dateioptionen auf den Versuch Astyle über C#Ungültige Option Dateioptionen: pad = oper

System.Diagnostics.Process pProcess = new System.Diagnostics.Process(); 
    pProcess.StartInfo.FileName = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\Astyle.exe"; 

    //strCommandParameters are parameters to pass to program 
    //pProcess.StartInfo.Arguments = "--style=ansi --recursive "+System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)+"/*.cpp"; 

    pProcess.StartInfo.Arguments = " options=none test.cpp"; 
    //pProcess.StartInfo.Arguments = " -h"; 
    pProcess.StartInfo.UseShellExecute = false; 

    //Set output of program to be written to process output stream 
    pProcess.StartInfo.RedirectStandardOutput = true; 
    pProcess.StartInfo.RedirectStandardError = true; 
    //Optional 
    pProcess.StartInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); 

    //Start the process 
    pProcess.Start(); 

    //Get program output 
    string strOutput = pProcess.StandardOutput.ReadToEnd(); 
    string strError = pProcess.StandardError.ReadToEnd(); 
    //Wait for process to finish 
    pProcess.WaitForExit(); 

Antwort

1

aufrufen Wenn Sie einen Blick auf this link nehmen die korrekte Syntax

zu sein scheint
--options=none 
+0

+1 für das Durchsuchen der Dokumentation auch ohne einen Link zur Verfügung gestellt. – alexn

+0

@kingpin: Ich frage mich, ob Sie Ihr Problem gelöst haben ... – Marco

+0

Ja Gelöst ..... thnx: D – kingpin