public static ProjectReferenceXElement New(XElement parent, string projectFilePath) { var projectReference = ProjectReferenceXElement.New(projectFilePath); parent.Add(projectReference.Value); return(projectReference); }
public static IProjectReference AddProjectReference(this ProjectReferencesItemGroupXElement projectReferencesItemGroupXElement, string projectFilePath) { var hasProjectReferenceAlready = projectReferencesItemGroupXElement.HasProjectReference(projectFilePath); if (hasProjectReferenceAlready) { throw new InvalidOperationException($"Project already has project reference:\n{projectFilePath}"); } var projectReference = ProjectReferenceXElement.New(projectReferencesItemGroupXElement, projectFilePath); return(projectReference); }
public static ProjectReferenceXElement New(ProjectReferencesItemGroupXElement parent, string projectFilePath) { var projectReference = ProjectReferenceXElement.New(parent.Value, projectFilePath); return(projectReference); }