Merge pull request #819 from brendanzagaeski/patch-1
[mono.git] / mcs / class / Microsoft.Build.Utilities / Microsoft.Build.Utilities / ToolTask.cs
index 77814aab8621b327e16c0e952105454ac32dd66b..ee7c37a3691958e16481e18132fabae1cbbea731 100644 (file)
@@ -72,7 +72,6 @@ namespace Microsoft.Build.Utilities
                {
                        this.TaskResources = taskResources;
                        this.HelpKeywordPrefix = helpKeywordPrefix;
-                       this.toolPath = MonoLocationHelper.GetBinDir ();
                        this.responseFileEncoding = Encoding.UTF8;
                        this.timeout = Int32.MaxValue;
                }
@@ -298,6 +297,7 @@ namespace Microsoft.Build.Utilities
 
                        pinfo.WorkingDirectory = GetWorkingDirectory () ?? Environment.CurrentDirectory;
                        pinfo.UseShellExecute = false;
+                       pinfo.CreateNoWindow = true;
                        pinfo.RedirectStandardOutput = true;
                        pinfo.RedirectStandardError = true;
 
@@ -439,15 +439,12 @@ namespace Microsoft.Build.Utilities
                public virtual string ToolExe
                {
                        get {
-                               if (toolExe == null)
+                               if (string.IsNullOrEmpty (toolExe))
                                        return ToolName;
                                else
                                        return toolExe;
                        }
-                       set {
-                               if (!String.IsNullOrEmpty (value))
-                                       toolExe = value;
-                       }
+                       set { toolExe = value; }
                }
 
                protected abstract string ToolName
@@ -458,10 +455,7 @@ namespace Microsoft.Build.Utilities
                public string ToolPath
                {
                        get { return toolPath; }
-                       set {
-                               if (!String.IsNullOrEmpty (value))
-                                       toolPath  = value;
-                       }
+                       set { toolPath  = value; }
                }
 
                // Keep in sync with mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs