예제 #1
0
파일: Program.cs 프로젝트: wk-j/DotNetKoans
		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;
		}
예제 #2
0
 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;
 }
예제 #3
0
파일: Program.cs 프로젝트: wk-j/DotNetKoans
		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);
		}