private PackageInProject XmlToPackage(XElement el, PackagePath path) { var id = el.Attribute("id")?.Value; var version = el.Attribute("version")?.Value; return(_packageInProjectReader.Read(id, version, path, null)); }
private PackageInProject XmlToPackage(XNamespace ns, XElement el, PackagePath path, IEnumerable <string> projectReferences) { var id = el.Attribute("Include")?.Value; var version = el.Attribute("Version")?.Value ?? el.Element(ns + "Version")?.Value; return(_packageInProjectReader.Read(id, version, path, projectReferences)); }
private PackageInProject XmlToPackage(XElement el, PackagePath path) { var id = el.Attribute("Include")?.Value; if (id == null) { id = el.Attribute("Update")?.Value; } var version = el.Attribute("Version")?.Value ?? el.Element("Version")?.Value; return(_packageInProjectReader.Read(id, version, path, null)); }
private PackageInProject XmlToPackage(XElement el, PackagePath path) { try { var id = el.Attribute("id")?.Value; var version = el.Attribute("version")?.Value; return(_packageInProjectReader.Read(id, version, path, null)); } catch (Exception ex) { _logger.Error($"Could not read package from {el} in file {path.FullName}", ex); return(null); } }
private PackageInProject XmlToPackage(XNamespace ns, XElement el, PackagePath path, IEnumerable <string> projectReferences) { try { var id = el.Attribute("Include")?.Value; var version = el.Attribute("Version")?.Value ?? el.Element(ns + "Version")?.Value; return(_packageInProjectReader.Read(id, version, path, projectReferences)); } catch (Exception ex) { _logger.Error($"Could not read package from {el} in file {path.FullName}", ex); return(null); } }
private PackageInProject XmlToPackage(XElement el, PackagePath path) { try { var id = el.Attribute("Include")?.Value; if (id == null) { id = el.Attribute("Update")?.Value; } var version = el.Attribute("Version")?.Value; return _packageInProjectReader.Read(id, version, path, null); } catch (Exception ex) { _logger.Error($"Could not read package from {el} in file {path.FullName}", ex); return null; } }