Merge pull request #3057 from BrzVlad/fix-major-log3
[mono.git] / mcs / class / Cscompmgd / Microsoft.CSharp / Compiler.cs
index a7def6d141cea6112785091dbeb04c5bb6b4ab50..5b75d9c890481c3675cad5caaae9f5637ca0e183 100644 (file)
@@ -36,9 +36,7 @@ using System.Text.RegularExpressions;
 
 namespace Microsoft.CSharp {
 
-#if NET_2_0
        [System.Obsolete]
-#endif
        public class Compiler {
                
                private Compiler()
@@ -100,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.StandardError.ReadToEnd();
+                               mcs_output = mcs.StandardError.ReadToEnd ();
+                               mcs.StandardOutput.ReadToEnd ();
                                mcs.WaitForExit ();
                        } finally {
                                mcs.Close ();