Beispiel #1
0
        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);
        }
Beispiel #3
0
        public static ProjectReferenceXElement New(ProjectReferencesItemGroupXElement parent, string projectFilePath)
        {
            var projectReference = ProjectReferenceXElement.New(parent.Value, projectFilePath);

            return(projectReference);
        }