public IProject FindProject(string name) { var result = Projects.FirstOrDefault(project => project.Name == name); if (result == null) { throw new Exception($"Unable to find project with name {name}"); } return result; }
private static IProject FindProject(Solution solution, string project) { try { return solution.FindProject(project); } catch (Exception e) { console.WriteLine(e.Message); return null; } }