private Project ParseProject(RelPath projectFilePath, RelPath root) { _logger.LogWarning("Parsing project at {path}", projectFilePath.Path); var projectFileXml = XElement.Parse(_filesystem.ReadFile(projectFilePath.Path)); var projectFolder = projectFilePath.Parent; var otherProjects = projectFileXml .Descendants("ProjectReference") .Select(x => x.Attribute("Include").Value) .Select(x => RelPath.FromString(x).RelativeTo(projectFolder).RelativeTo(root)) .Select(x => ParseProject(x, root)) .ToArray(); return(new Project(projectFilePath, otherProjects)); }
public Project Load(RelPath projectFilePath) { return(ParseProject(projectFilePath, RelPath.FromString(""))); }