make tests does not depend from NuGetRunner and NuGet, catch command exceptions,...
authorEugene Petrenko <eugene.petrenko@gmail.com>
Fri, 15 Jul 2011 13:35:56 +0000 (17:35 +0400)
committerEugene Petrenko <eugene.petrenko@gmail.com>
Fri, 15 Jul 2011 13:35:56 +0000 (17:35 +0400)
18 files changed:
nuget-extensions/nuget-commands/nuget-commands.csproj
nuget-extensions/nuget-commands/src/CommandBase.cs [new file with mode: 0644]
nuget-extensions/nuget-commands/src/ListCommandBase.cs
nuget-extensions/nuget-commands/src/NuGetTeamCityListCommand.cs
nuget-extensions/nuget-commands/src/NuGetTeamCityListPackagesCommand.cs
nuget-extensions/nuget-extensions.sln
nuget-extensions/nuget-runner/src/NuGetInstallExtensions.cs
nuget-extensions/nuget-runner/src/NuGetRunner.cs
nuget-extensions/nuget-tests/nuget-tests.csproj
nuget-extensions/nuget-tests/src/Files.cs [new file with mode: 0644]
nuget-extensions/nuget-tests/src/NuGet.cs [deleted file]
nuget-extensions/nuget-tests/src/NuGetConstants.cs [new file with mode: 0644]
nuget-extensions/nuget-tests/src/NuGetRunner.cs [deleted file]
nuget-extensions/nuget-tests/src/NuGetRunnerTest.cs
nuget-extensions/nuget-tests/src/NuGetRunner_ListCommandTest.cs
nuget-extensions/nuget-tests/src/NuGetRunner_ListPackagesCommandTest.cs
nuget-extensions/nuget-tests/src/PathSearcher.cs [new file with mode: 0644]
nuget-extensions/nuget-tests/src/ProcessExecutor.cs

index 53193f9371b9d7f0347af5efa680691efd0e6b19..f1160e88ed224b384f3c7a53939db6d77fb916c3 100644 (file)
@@ -12,6 +12,8 @@
     <AssemblyName>JetBrains.TeamCity.NuGet.ExtendedCommands</AssemblyName>\r
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r
     <FileAlignment>512</FileAlignment>\r
+    <TargetFrameworkProfile>\r
+    </TargetFrameworkProfile>\r
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
     <Reference Include="System" />\r
     <Reference Include="System.ComponentModel.Composition" />\r
     <Reference Include="System.Core" />\r
-    <Reference Include="System.Xml.Linq" />\r
-    <Reference Include="System.Data.DataSetExtensions" />\r
     <Reference Include="Microsoft.CSharp" />\r
-    <Reference Include="System.Data" />\r
     <Reference Include="System.Xml" />\r
   </ItemGroup>\r
   <ItemGroup>\r
+    <Compile Include="src\CommandBase.cs" />\r
     <Compile Include="src\ListCommandBase.cs" />\r
     <Compile Include="src\NuGetTeamCityListCommand.cs" />\r
     <Compile Include="Properties\AssemblyInfo.cs" />\r
diff --git a/nuget-extensions/nuget-commands/src/CommandBase.cs b/nuget-extensions/nuget-commands/src/CommandBase.cs
new file mode 100644 (file)
index 0000000..6f2b3bc
--- /dev/null
@@ -0,0 +1,24 @@
+using System;\r
+using NuGet;\r
+using NuGet.Commands;\r
+\r
+namespace JetBrains.TeamCity.NuGet.ExtendedCommands\r
+{\r
+  public abstract class CommandBase : Command\r
+  {\r
+    public sealed override void ExecuteCommand()\r
+    {\r
+      try\r
+      {\r
+        ExecuteCommandImpl();\r
+      } catch(Exception e)\r
+      {\r
+        System.Console.Error.WriteLine("Failed to execute commnad: " + e.Message);\r
+        System.Console.Error.WriteLine(e);\r
+        throw new CommandLineException("TeamCity command failed");\r
+      }\r
+    }\r
+\r
+    protected abstract void ExecuteCommandImpl();\r
+  }\r
+}
\ No newline at end of file
index 92331892f494fbc40cdffd5682f55184b9984f6b..a8d11f3eccbe46ca76c0b9edf0d4daf8281555c7 100644 (file)
@@ -5,11 +5,10 @@ using System.Linq;
 using System.Linq.Expressions;\r
 using JetBrains.TeamCity.NuGet.ExtendedCommands.Util;\r
 using NuGet;\r
-using NuGet.Commands;\r
 \r
 namespace JetBrains.TeamCity.NuGet.ExtendedCommands\r
 {\r
-  public abstract class ListCommandBase : Command\r
+  public abstract class ListCommandBase : CommandBase\r
   {\r
     [Import]\r
     public IPackageRepositoryFactory RepositoryFactory { get; set; }\r
index 2da75e3b017c784be65f6a71e19581f0f1121ff3..aac4cbecb677e8541904a01a0235b820031b019f 100644 (file)
@@ -17,7 +17,7 @@ namespace JetBrains.TeamCity.NuGet.ExtendedCommands
     [Option("NuGet Version Spec to constraint versions to be checked. Optional")]\r
     public string Version { get; set; }\r
 \r
-    public override void ExecuteCommand()\r
+    protected override void ExecuteCommandImpl()\r
     {\r
       if (string.IsNullOrWhiteSpace(Source))\r
         Source = NuGetConstants.DefaultFeedUrl;\r
index 45fc713ad7c53708e54648795e53b7c8b7f3aafb..f5f70a62192fbfb132862c4971e751445f94a7e6 100644 (file)
@@ -13,7 +13,7 @@ namespace JetBrains.TeamCity.NuGet.ExtendedCommands
     [Option("Path to file containing package-version pairs to check for updates")]\r
     public string Request { get; set; }\r
 \r
-    public override void ExecuteCommand()\r
+    protected override void ExecuteCommandImpl()\r
     {\r
       var req = LoadRequests();\r
 \r
@@ -31,9 +31,7 @@ namespace JetBrains.TeamCity.NuGet.ExtendedCommands
       package = package.Where(x =>\r
                                 {\r
                                   Func<IPackage, bool> r;\r
-                                  if (!hash.TryGetValue(x.Id, out r))\r
-                                    return true;\r
-                                  return r(x);\r
+                                  return !hash.TryGetValue(x.Id, out r) || r(x);\r
                                 });\r
 \r
       foreach (var pkg in package)\r
index 25eebb3606b0019f966bc78e01a54f1223de1645..2c8693be36d33b9bdc1c4a02300b72a4832f3d79 100644 (file)
@@ -6,6 +6,10 @@ EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nuget-runner", "nuget-runner\nuget-runner.csproj", "{B79E58CB-F8FD-4CD6-8B62-10EBA0DF592B}"\r
 EndProject\r
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nuget-tests", "nuget-tests\nuget-tests.csproj", "{6D862627-466B-4CD1-82DE-E57B7B976EB6}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {B79E58CB-F8FD-4CD6-8B62-10EBA0DF592B} = {B79E58CB-F8FD-4CD6-8B62-10EBA0DF592B}\r
+               {8FA969EA-85C0-464E-9745-66B9820121A9} = {8FA969EA-85C0-464E-9745-66B9820121A9}\r
+       EndProjectSection\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
index 3cc11d9fd5d379835b8289d109eba47223bb4630..d79e15597f497384a9f96b85c83a95b2fc8a0690 100644 (file)
@@ -12,6 +12,9 @@ namespace JetBrains.TeamCity.NuGetRunner
       runner.BeforeNuGetStarted += (_, __) =>\r
                                      {\r
                                        string home = computeHome();\r
+                                       if (Directory.Exists(home))\r
+                                         Directory.Delete(home, true);\r
+\r
                                        if (!Directory.Exists(home))\r
                                          Directory.CreateDirectory(home);\r
 \r
index 728d8c4eca89e3490f7ed7aff6057715c66a372c..c1b580195035b98d8a8c6550e96e258ba37ac291 100644 (file)
@@ -88,7 +88,8 @@ namespace JetBrains.TeamCity.NuGetRunner
                                         UseShellExecute = false,\r
                                         RedirectStandardInput = true, \r
                                         RedirectStandardError = true, \r
-                                        RedirectStandardOutput = true\r
+                                        RedirectStandardOutput = true, \r
+                                        CreateNoWindow = true,\r
                                       });\r
 \r
         process.StandardInput.Close();\r
index fd251b10c253ca3ccecaf3b6404b79f249387a2c..770e2c10fc8a96ea9457195db399882e6fb76627 100644 (file)
@@ -32,9 +32,6 @@
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
   <ItemGroup>\r
-    <Reference Include="NuGet">\r
-      <HintPath>..\lib\nuget\1.4\NuGet.exe</HintPath>\r
-    </Reference>\r
     <Reference Include="nunit.framework">\r
       <HintPath>..\lib\nunit\nunit.framework.dll</HintPath>\r
     </Reference>\r
     <Reference Include="System.Xml" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <Compile Include="src\NuGet.cs" />\r
-    <Compile Include="src\NuGetRunner.cs" />\r
+    <Compile Include="..\nuget-runner\src\AssemblyHelper.cs">\r
+      <Link>src\AssemblyHelper.cs</Link>\r
+    </Compile>\r
+    <Compile Include="src\Files.cs" />\r
+    <Compile Include="src\NuGetConstants.cs" />\r
     <Compile Include="src\NuGetRunnerTest.cs" />\r
     <Compile Include="Properties\AssemblyInfo.cs" />\r
     <Compile Include="src\NuGetRunner_ListCommandTest.cs" />\r
     <Compile Include="src\NuGetRunner_ListPackagesCommandTest.cs" />\r
+    <Compile Include="src\PathSearcher.cs" />\r
     <Compile Include="src\ProcessExecutor.cs" />\r
     <Compile Include="src\TempFilesHolder.cs" />\r
   </ItemGroup>\r
-  <ItemGroup>\r
-    <ProjectReference Include="..\nuget-commands\nuget-commands.csproj">\r
-      <Project>{8FA969EA-85C0-464E-9745-66B9820121A9}</Project>\r
-      <Name>nuget-commands</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\nuget-runner\nuget-runner.csproj">\r
-      <Project>{B79E58CB-F8FD-4CD6-8B62-10EBA0DF592B}</Project>\r
-      <Name>nuget-runner</Name>\r
-    </ProjectReference>\r
-  </ItemGroup>\r
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
        Other similar extension points exist, see Microsoft.Common.targets.\r
diff --git a/nuget-extensions/nuget-tests/src/Files.cs b/nuget-extensions/nuget-tests/src/Files.cs
new file mode 100644 (file)
index 0000000..689161d
--- /dev/null
@@ -0,0 +1,15 @@
+using System;\r
+\r
+namespace JetBrains.TeamCity.NuGet.Tests\r
+{\r
+  public static class Files\r
+  {\r
+    private static readonly Lazy<string> ourCachedNuGetExe = PathSearcher.SearchFile("nuget.exe", "lib/nuget/1.4/nuget.exe");\r
+    private static readonly Lazy<string> ourCachedNuGetRunnerPath = PathSearcher.SearchFile("JetBrains.TeamCity.NuGetRunner.exe", "bin/JetBrains.TeamCity.NuGetRunner.exe");\r
+    private static readonly Lazy<string> ourLocalFeed = PathSearcher.SearchDirectory("nuget-tests/testData/localFeed");\r
+    \r
+    public static string NuGetExe { get { return ourCachedNuGetExe.Value; } }\r
+    public static string NuGetRunnerExe { get { return ourCachedNuGetRunnerPath.Value; } }\r
+    public static string LocalFeed { get { return ourLocalFeed.Value; } }\r
+  }\r
+}
\ No newline at end of file
diff --git a/nuget-extensions/nuget-tests/src/NuGet.cs b/nuget-extensions/nuget-tests/src/NuGet.cs
deleted file mode 100644 (file)
index 3449ec8..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;\r
-using System.IO;\r
-using JetBrains.TeamCity.NuGetRunner;\r
-\r
-namespace JetBrains.TeamCity.NuGet.Tests\r
-{\r
-  public static class NuGet\r
-  {\r
-    private static string ourCachedNuGetExe = null;\r
-    public static string NuGetPath\r
-    {\r
-      get\r
-      {\r
-        if (ourCachedNuGetExe != null) return ourCachedNuGetExe;\r
-\r
-        string path = typeof(NuGetRunnerTest).Assembly.GetAssemblyDirectory();\r
-\r
-        do\r
-        {\r
-          foreach (var probe in new[] { "nuget.exe", "lib/nuget/1.4/nuget.exe" })\r
-          {\r
-            string nuget = Path.Combine(path, probe);\r
-            if (File.Exists(nuget))\r
-              return ourCachedNuGetExe = nuget;\r
-          }\r
-\r
-          path = Path.GetDirectoryName(path);\r
-        } while (path != null);\r
-        throw new Exception("Failed to find NuGet.exe near project");\r
-      }\r
-\r
-    }\r
-\r
-  }\r
-}
\ No newline at end of file
diff --git a/nuget-extensions/nuget-tests/src/NuGetConstants.cs b/nuget-extensions/nuget-tests/src/NuGetConstants.cs
new file mode 100644 (file)
index 0000000..af69085
--- /dev/null
@@ -0,0 +1,7 @@
+namespace JetBrains.TeamCity.NuGet.Tests\r
+{\r
+  public static class NuGetConstants\r
+  {\r
+    public const string DefaultFeedUrl = "https://go.microsoft.com/fwlink/?LinkID=206669";\r
+  }\r
+}
\ No newline at end of file
diff --git a/nuget-extensions/nuget-tests/src/NuGetRunner.cs b/nuget-extensions/nuget-tests/src/NuGetRunner.cs
deleted file mode 100644 (file)
index 9159d80..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-using System;\r
-using JetBrains.TeamCity.NuGetRunner;\r
-\r
-namespace JetBrains.TeamCity.NuGet.Tests\r
-{\r
-  public static class NuGetRunner\r
-  {\r
-    public static readonly Lazy<string> Path = new Lazy<string>(()=>typeof (Program).Assembly.GetAssemblyPath());\r
-  }\r
-}
\ No newline at end of file
index 438a7dfe4f4c7442017b79d3f3ba6fa842054155..46902750b6ca2aedc673bcc2e08cc530bd5dab71 100644 (file)
@@ -9,7 +9,7 @@ namespace JetBrains.TeamCity.NuGet.Tests
     [Test]\r
     public void TestExcuteNuGet()\r
     {\r
-      var r = ProcessExecutor.ExecuteProcess(NuGetRunner.Path.Value, NuGet.NuGetPath, "help");\r
+      var r = ProcessExecutor.ExecuteProcess(Files.NuGetRunnerExe, Files.NuGetExe, "help");\r
       Console.Out.WriteLine(r);\r
 \r
       Assert.IsTrue(r.ExitCode == 0);\r
@@ -18,7 +18,7 @@ namespace JetBrains.TeamCity.NuGet.Tests
     [Test]\r
     public void TestDumpExtensionsPath()\r
     {\r
-      var r = ProcessExecutor.ExecuteProcess(NuGetRunner.Path.Value, NuGet.NuGetPath, "---TeamCity.DumpExtensionsPath");\r
+      var r = ProcessExecutor.ExecuteProcess(Files.NuGetRunnerExe, Files.NuGetExe, "---TeamCity.DumpExtensionsPath");\r
       Console.Out.WriteLine(r);\r
 \r
       Assert.IsTrue(r.ExitCode == 0);\r
@@ -27,7 +27,7 @@ namespace JetBrains.TeamCity.NuGet.Tests
     [Test]\r
     public void TestCommand_TeamCityPing()\r
     {\r
-      ProcessExecutor.ExecuteProcess(NuGetRunner.Path.Value, NuGet.NuGetPath, "TeamCity.Ping")\r
+      ProcessExecutor.ExecuteProcess(Files.NuGetRunnerExe, Files.NuGetExe, "TeamCity.Ping")\r
         .Dump()\r
         .AssertExitedSuccessfully()\r
         .AssertNoErrorOutput()\r
index 96684b0c8e52b29051547d2c57c25158e078a64e..fb70a4020b873b88a41975d63a2e3a9c33e56ac3 100644 (file)
@@ -1,15 +1,14 @@
 using NUnit.Framework;\r
-using NuGet;\r
 \r
 namespace JetBrains.TeamCity.NuGet.Tests\r
 {\r
   [TestFixture]\r
-  public class NuGetRunner_ListCommandTest\r
+  public class NuGetRunner_ListCommandTest_Remote\r
   {\r
     [Test]\r
     public void TestCommand_TeamListPublic()\r
     {\r
-      ProcessExecutor.ExecuteProcess(NuGetRunner.Path.Value, NuGet.NuGetPath, "TeamCity.List", "-Id", "NUnit", "-Source", NuGetConstants.DefaultFeedUrl)\r
+      ProcessExecutor.ExecuteProcess(Files.NuGetRunnerExe, Files.NuGetExe, "TeamCity.List", "-Id", "NUnit", "-Source", NuGetConstants.DefaultFeedUrl)\r
         .Dump()\r
         .AssertExitedSuccessfully()\r
         .AssertNoErrorOutput()\r
@@ -19,7 +18,7 @@ namespace JetBrains.TeamCity.NuGet.Tests
     [Test]\r
     public void TestCommand_TeamListPublicVersion()\r
     {\r
-      var r = ProcessExecutor.ExecuteProcess(NuGetRunner.Path.Value, NuGet.NuGetPath, "TeamCity.List", "-Id", "NUnit", "-Version", "(1.1.1, 2.5.8)", "-Source", NuGetConstants.DefaultFeedUrl)\r
+      var r = ProcessExecutor.ExecuteProcess(Files.NuGetRunnerExe, Files.NuGetExe, "TeamCity.List", "-Id", "NUnit", "-Version", "(1.1.1, 2.5.8)", "-Source", NuGetConstants.DefaultFeedUrl)\r
         .Dump()\r
         .AssertExitedSuccessfully()\r
         .AssertNoErrorOutput()\r
@@ -28,4 +27,33 @@ namespace JetBrains.TeamCity.NuGet.Tests
       Assert.IsFalse(r.Output.Contains("Version='2.5.10"));\r
     }\r
   }\r
+\r
+  [TestFixture]\r
+  public class NuGetRunner_ListCommandTest_Local\r
+  {\r
+    [Test]\r
+    public void TestCommand_TeamListPublic()\r
+    {\r
+      ProcessExecutor.ExecuteProcess(Files.NuGetRunnerExe, Files.NuGetExe, "TeamCity.List", "-Id", "Web", "-Source", Files.LocalFeed)\r
+        .Dump()\r
+        .AssertExitedSuccessfully()\r
+        .AssertNoErrorOutput()\r
+        .AssertOutputContains("##teamcity[nuget-package Id='Web' Version='1.1.1']",\r
+                              "##teamcity[nuget-package Id='Web' Version='1.2.1']",\r
+                              "##teamcity[nuget-package Id='Web' Version='2.2.2']");\r
+    }\r
+\r
+    [Test]\r
+    public void TestCommand_TeamListPublicVersion()\r
+    {\r
+      var r = ProcessExecutor.ExecuteProcess(Files.NuGetRunnerExe, Files.NuGetExe, "TeamCity.List", "-Id", "Web", "-Version", "(1.2.0, 2.1.8)", "-Source", Files.LocalFeed)\r
+        .Dump()\r
+        .AssertExitedSuccessfully()\r
+        .AssertNoErrorOutput()\r
+        .AssertOutputContains("##teamcity[nuget-package Id='Web' Version='1.2.1']");\r
+\r
+      Assert.IsFalse(r.Output.Contains("Version='1.1.1"));\r
+      Assert.IsFalse(r.Output.Contains("Version='2.2.2"));\r
+    }\r
+  }\r
 }
\ No newline at end of file
index ed671d3ff01a0d5af90234c00a3485576a2f9456..6061ead2f2ded09df0c719922c4d2429a66bf346 100644 (file)
@@ -1,11 +1,11 @@
 using System.IO;\r
 using NUnit.Framework;\r
-using NuGet;\r
 \r
 namespace JetBrains.TeamCity.NuGet.Tests\r
 {\r
+  [Ignore("Not yet needed in TeamCity NuGet support")]\r
   [TestFixture]\r
-  public class NuGetRunner_ListPackagesCommandTest\r
+  public class NuGetRunner_ListPackagesCommandTest_Remote\r
   {\r
     [Test]\r
     public void TestCommand_ListPublic()\r
@@ -17,7 +17,7 @@ namespace JetBrains.TeamCity.NuGet.Tests
                               "<NuGet-Request Source=\"" + NuGetConstants.DefaultFeedUrl +\r
                               "\"><Requests><Request Id='NUnit'/></Requests></NuGet-Request>");\r
 \r
-            ProcessExecutor.ExecuteProcess(NuGetRunner.Path.Value, NuGet.NuGetPath,\r
+            ProcessExecutor.ExecuteProcess(Files.NuGetRunnerExe, Files.NuGetExe,\r
                                            "TeamCity.ListPackages", "-Request", file)\r
               .Dump()\r
               .AssertExitedSuccessfully()\r
@@ -38,7 +38,7 @@ namespace JetBrains.TeamCity.NuGet.Tests
                               "<NuGet-Request Source=\"" + NuGetConstants.DefaultFeedUrl +\r
                               "\"><Requests><Request Id='NUnit' Versions='(1.1.1,2.5.8]'/></Requests></NuGet-Request>");\r
 \r
-            ProcessExecutor.ExecuteProcess(NuGetRunner.Path.Value, NuGet.NuGetPath,\r
+            ProcessExecutor.ExecuteProcess(Files.NuGetRunnerExe, Files.NuGetExe,\r
                                            "TeamCity.ListPackages", "-Request", file)\r
               .Dump()\r
               .AssertExitedSuccessfully()\r
diff --git a/nuget-extensions/nuget-tests/src/PathSearcher.cs b/nuget-extensions/nuget-tests/src/PathSearcher.cs
new file mode 100644 (file)
index 0000000..fadca09
--- /dev/null
@@ -0,0 +1,37 @@
+using System;\r
+using System.IO;\r
+using JetBrains.TeamCity.NuGetRunner;\r
+\r
+namespace JetBrains.TeamCity.NuGet.Tests\r
+{\r
+  public static class PathSearcher\r
+  {\r
+    public static Lazy<string> SearchFile(params string[] matcher)\r
+    {\r
+      return new Lazy<string>(()=> SearchForPath(File.Exists, matcher));\r
+    }\r
+\r
+    public static Lazy<string> SearchDirectory(params string[] matcher)\r
+    {\r
+      return new Lazy<string>(()=> SearchForPath(Directory.Exists, matcher));\r
+    }\r
+\r
+    private static string SearchForPath(Func<string, bool> exists,  params string[] matches)\r
+    {\r
+      string path = typeof(PathSearcher).Assembly.GetAssemblyDirectory();\r
+\r
+      do\r
+      {\r
+        foreach (var probe in matches)\r
+        {\r
+          string nuget = Path.Combine(path, probe);\r
+          if (exists(nuget))\r
+            return nuget;\r
+        }\r
+\r
+        path = Path.GetDirectoryName(path);\r
+      } while (path != null);\r
+      throw new Exception("Failed to find " + string.Join(", ", matches));\r
+    }\r
+  }\r
+}
\ No newline at end of file
index d819d89eb762574c301c495b3e144c10452a41d7..9fd4861b37e64a55e91474f741f5547f9ab52ce3 100644 (file)
@@ -19,9 +19,12 @@ namespace JetBrains.TeamCity.NuGet.Tests
                    RedirectStandardError = true,\r
                    RedirectStandardOutput = true,\r
                    RedirectStandardInput = true,\r
-                   UseShellExecute = false\r
+                   UseShellExecute = false,\r
+                   CreateNoWindow = true,\r
                  };\r
 \r
+      Console.Out.WriteLine("Starting: " + pi.FileName + " " + pi.Arguments);\r
+\r
       var process = Process.Start(pi);\r
       process.StandardInput.Close();\r
       Func<StreamReader, string> readOutput = stream =>\r