Merge pull request #3057 from BrzVlad/fix-major-log3
[mono.git] / mcs / class / Cscompmgd / Microsoft.CSharp / Compiler.cs
index 00928cd357e78bb44a4b80209164811b0f6a46b2..5b75d9c890481c3675cad5caaae9f5637ca0e183 100644 (file)
@@ -36,6 +36,7 @@ using System.Text.RegularExpressions;
 
 namespace Microsoft.CSharp {
 
+       [System.Obsolete]
        public class Compiler {
                
                private Compiler()
@@ -97,10 +98,12 @@ namespace Microsoft.CSharp {
                        mcs.StartInfo.CreateNoWindow = true;
                        mcs.StartInfo.UseShellExecute = false;
                        mcs.StartInfo.RedirectStandardOutput = true;
+                       mcs.StartInfo.RedirectStandardError = true;
 
                        try {
                                mcs.Start ();
-                               mcs_output = mcs.StandardOutput.ReadToEnd();
+                               mcs_output = mcs.StandardError.ReadToEnd ();
+                               mcs.StandardOutput.ReadToEnd ();
                                mcs.WaitForExit ();
                        } finally {
                                mcs.Close ();