Ejemplo n.º 1
0
        /// <summary>
        /// Adds a project reference to the solution's dependencies folder, but checks first to avoid adding duplicates.
        /// </summary>
        public static void AddProjectReferenceDependencyChecked(this SolutionFile solutionFile, SolutionFileProjectReference projectReference)
        {
            var hasProjectReference = solutionFile.HasProjectReference(projectReference);

            if (!hasProjectReference)
            {
                solutionFile.AddProjectReferenceAsDependency(projectReference);
            }
        }
Ejemplo n.º 2
0
        public static void AddProjectReferenceAsDependency(this SolutionFile solutionFile, string solutionFilePath, string projectFilePath)
        {
            var projectReference = SolutionFileProjectReference.NewNetCoreOrStandard(solutionFilePath, projectFilePath);

            solutionFile.AddProjectReferenceAsDependency(projectReference);
        }