public void Parse(string input)
        {
            Regex rebuild  = new Regex("------ [^:]+: [^:]+: (?<name>[^,]+)");
            Regex complete = new Regex("Compile complete --[^0-9]+(?<errors>[0-9]+)[^0-9]+(?<warnings>[0-9]+)");
            Regex summary  = new Regex("========== [^0-9]+(?<succeeded>[0-9]+)[^0-9]+(?<failed>[0-9]+)[^0-9]+(?<skipped>[0-9]+)");

            _solution      = new Solution();
            _solution.Name = "Unknown";

            //Match slnSummary = summary.Match(input);
            //if (slnSummary.Success)
            //{
            //  _solution.Succeeded = Int32.Parse(slnSummary.Groups["succeeded"].Value);
            //  _solution.Failed = Int32.Parse(slnSummary.Groups["failed"].Value);
            //  _solution.Skipped = Int32.Parse(slnSummary.Groups["skipped"].Value);
            //}

            MatchCollection projStart    = rebuild.Matches(input);
            MatchCollection projComplete = complete.Matches(input);

            int c = 0;

            for (int i = 0; i < projStart.Count; i++)
            {
                Project proj = new Project();

                proj.name = projStart[i].Groups["name"].Value;

                int  pos     = projStart[i].Index;
                bool skipped = false;

                if (projComplete[c].Index < pos)
                {
                    skipped = true;
                }

                if (i + 1 < projStart.Count && projComplete[c].Index > projStart[i + 1].Index)
                {
                    skipped = true;
                }

                if (skipped)
                {
                    proj.build    = Solution.Compile.Skipped;
                    proj.errors   = 0;
                    proj.warnings = 0;
                }
                else
                {
                    proj.build    = Solution.Compile.Success;
                    proj.errors   = Int32.Parse(projComplete[c].Groups["errors"].Value);
                    proj.warnings = Int32.Parse(projComplete[c].Groups["warnings"].Value);
                    if (proj.errors > 0)
                    {
                        proj.build = Solution.Compile.Failed;
                    }
                }

                if (c + 1 < projComplete.Count)
                {
                    c++;
                }

                _solution.AddProject(proj);
            }

            _solution.Projects.Sort();
        }
    public void Parse(string input)
    {
      Regex rebuild = new Regex("------ [^:]+: [^:]+: (?<name>[^,]+)");
      Regex complete = new Regex("Compile complete --[^0-9]+(?<errors>[0-9]+)[^0-9]+(?<warnings>[0-9]+)");
      Regex summary = new Regex("========== [^0-9]+(?<succeeded>[0-9]+)[^0-9]+(?<failed>[0-9]+)[^0-9]+(?<skipped>[0-9]+)");

      _solution = new Solution();
      _solution.Name = "Unknown";

      //Match slnSummary = summary.Match(input);
      //if (slnSummary.Success)
      //{
      //  _solution.Succeeded = Int32.Parse(slnSummary.Groups["succeeded"].Value);
      //  _solution.Failed = Int32.Parse(slnSummary.Groups["failed"].Value);
      //  _solution.Skipped = Int32.Parse(slnSummary.Groups["skipped"].Value);
      //}

      MatchCollection projStart = rebuild.Matches(input);
      MatchCollection projComplete = complete.Matches(input);

      int c = 0;
      for (int i = 0; i < projStart.Count; i++)
      {
        Project proj = new Project();

        proj.name = projStart[i].Groups["name"].Value;

        int pos = projStart[i].Index;
        bool skipped = false;

        if (projComplete[c].Index < pos)
          skipped = true;

        if (i + 1 < projStart.Count && projComplete[c].Index > projStart[i + 1].Index)
          skipped = true;

        if (skipped)
        {
          proj.build = Solution.Compile.Skipped;
          proj.errors = 0;
          proj.warnings = 0;
        }
        else
        {
          proj.build = Solution.Compile.Success;
          proj.errors = Int32.Parse(projComplete[c].Groups["errors"].Value);
          proj.warnings = Int32.Parse(projComplete[c].Groups["warnings"].Value);
          if (proj.errors > 0)
            proj.build = Solution.Compile.Failed;
        }

        if (c + 1 < projComplete.Count)
          c++;

        _solution.AddProject(proj);
      }

      _solution.Projects.Sort();
    }
        public void Parse(string input)
        {
            _solution = new Solution();

            Regex projectSearch = new Regex("\"(?<solution>[^\"]+)\" is building \"(?<project>[^\"]+)\"");
            Regex targetSearch  = new Regex("Target (?<target>[^:]+):Rebuild:");

            List <string> lines = GetLines(input);

            FileInfo solutionFile = null;
            Project  project      = new Project();

            foreach (string line in lines)
            {
                switch (IndentDepth(line))
                {
                case 0: // header + footer
                    if (line.IndexOf("Build") == 0 && (line.IndexOf("succeeded") > 0 || line.IndexOf("FAILED") > 0))
                    {
                        // save last project
                        _solution.AddProject(project);
                    }
                    break;

                case 4: // project start
                    if (line.IndexOf(":Rebuild:") > 0)
                    {
                        if (project.name != string.Empty)
                        {
                            // save last project
                            _solution.AddProject(project);
                            // create new project
                            project = new Project();
                        }

                        Match lineMatch = targetSearch.Match(line);
                        if (lineMatch.Success)
                        {
                            project.name = lineMatch.Groups["target"].Value.Replace('_', '.');
                        }
                    }
                    break;

                case 8: // project info
                    if (line.IndexOf(".sln") > 0)
                    {
                        Match lineMatch = projectSearch.Match(line);

                        if (lineMatch.Success)
                        {
                            if (solutionFile == null)
                            {
                                string solutionName = lineMatch.Groups["solution"].Value;
                                solutionFile   = new FileInfo(solutionName);
                                _solution.Name = solutionFile.Name;
                            }

                            string projectName = lineMatch.Groups["project"].Value;

                            FileInfo projectFile = new FileInfo(projectName);

                            project.filename = Path.Combine(GetProjectDirectory(projectFile.Directory, solutionFile.Directory), projectFile.Name);
                            project.build    = Solution.Compile.Success;
                        }
                        break;
                    }

                    if (line.IndexOf("Done building project") > 0 && line.IndexOf("FAILED") > 0)
                    {
                        project.build = Solution.Compile.Failed;
                    }

                    break;

                case 12: // details
                    if (line.IndexOf(": warning CS") > 0)
                    {
                        project.warnings++;
                        break;
                    }

                    if (line.IndexOf(": error CS") > 0)
                    {
                        project.errors++;
                        break;
                    }
                    break;

                default:
                    break;
                }
            }
            _solution.Projects.Sort();
        }
    public void Parse(string input)
    {
      _solution = new Solution();

      Regex projectSearch = new Regex("\"(?<solution>[^\"]+)\" is building \"(?<project>[^\"]+)\"");
      Regex targetSearch = new Regex("Target (?<target>[^:]+):Rebuild:");

      List<string> lines = GetLines(input);

      FileInfo solutionFile = null;
      Project project = new Project();

      foreach (string line in lines)
      {
        switch (IndentDepth(line))
        {
          case 0: // header + footer
            if (line.IndexOf("Build") == 0 && (line.IndexOf("succeeded") > 0 || line.IndexOf("FAILED") > 0))
            {
              // save last project
              _solution.AddProject(project);
            }
            break;
          case 4: // project start
            if (line.IndexOf(":Rebuild:") > 0)
            {
              if (project.name != string.Empty)
              {
                // save last project
                _solution.AddProject(project);
                // create new project
                project = new Project();
              }

              Match lineMatch = targetSearch.Match(line);
              if (lineMatch.Success)
                project.name = lineMatch.Groups["target"].Value.Replace('_', '.');
            }
            break;
          case 8: // project info
            if (line.IndexOf(".sln") > 0)
            {
              Match lineMatch = projectSearch.Match(line);

              if (lineMatch.Success)
              {
                if (solutionFile == null)
                {
                  string solutionName = lineMatch.Groups["solution"].Value;
                  solutionFile = new FileInfo(solutionName);
                  _solution.Name = solutionFile.Name;
                }

                string projectName = lineMatch.Groups["project"].Value;

                FileInfo projectFile = new FileInfo(projectName);

                project.filename = Path.Combine(GetProjectDirectory(projectFile.Directory, solutionFile.Directory), projectFile.Name);
                project.build = Solution.Compile.Success;
              }
              break;
            }

            if (line.IndexOf("Done building project") > 0 && line.IndexOf("FAILED") > 0)
              project.build = Solution.Compile.Failed;

            break;
          case 12: // details
            if (line.IndexOf(": warning CS") > 0)
            {
              project.warnings++;
              break;
            }

            if (line.IndexOf(": error CS") > 0)
            {
              project.errors++;
              break;
            }
            break;
          default:
            break;
        }
      }
      _solution.Projects.Sort();
    }