private static bool BuildProject(KoanSource koans) { Console.WriteLine("Building..."); using (Process build = new Process()) { build.StartInfo.FileName = "devenv"; build.StartInfo.Arguments = String.Format(@"/build Debug /project {0} ..\..\..\DotNetKoans.sln", koans.ProjectName); build.StartInfo.CreateNoWindow = true; build.Start(); build.WaitForExit(); } return false; }
private static bool BuildProject(KoanSource koans) { Console.WriteLine("Building..."); using (Process build = new Process()) { build.StartInfo.FileName = "devenv"; build.StartInfo.Arguments = String.Format(@"/build Debug /project {0} ..\..\..\DotNetKoans.sln", koans.ProjectName); build.StartInfo.CreateNoWindow = true; build.Start(); build.WaitForExit(); if(build.ExitCode != 0) { Console.WriteLine("There was a build error. Please check your code and try again."); } } return false; }
private static void RunKoans(KoanSource koans) { if (File.Exists(koans.AssemblyPath)) { Console.WriteLine("Checking Koans..."); using (Process launch = new Process()) { launch.StartInfo.FileName = koansRunner; launch.StartInfo.Arguments = koans.AssemblyPath; launch.StartInfo.RedirectStandardOutput = true; launch.StartInfo.UseShellExecute = false; launch.Start(); string output = launch.StandardOutput.ReadToEnd(); launch.WaitForExit(); EchoResult(output, koans.ProjectName); } } File.Delete(koans.AssemblyPath); }