Example #1
0
 /// <summary>
 /// Adds project files to the solution file under the dependencies solution folder, checking whether the project file already exists to avoid adding duplicates.
 /// </summary>
 public static void AddProjectReferenceDependenciesChecked(this SolutionFile solutionFile, string solutionFilePath, IEnumerable <string> projectFilePaths)
 {
     foreach (var projectFilePath in projectFilePaths)
     {
         solutionFile.AddProjectReferenceDependencyChecked(solutionFilePath, projectFilePath);
     }
 }
Example #2
0
 public static void AddProjectReferences(this SolutionFile solutionFile, IEnumerable <SolutionFileProjectReference> projectReferences)
 {
     foreach (var projectReference in projectReferences)
     {
         solutionFile.AddProjectReferenceDependencyChecked(projectReference);
     }
 }
Example #3
0
        /// <summary>
        /// Must also specify dependency project file paths because the solution file types assembly does not reference the project file types assembly.
        /// </summary>
        public static void AddProjectReferenceDependencyAndAllDependenciesChecked(this SolutionFile solutionFile, string solutionFilePath, string projectFilePath, IEnumerable <string> dependencyProjectFilePaths)
        {
            solutionFile.AddProjectReferenceDependencyChecked(solutionFilePath, projectFilePath);

            solutionFile.AddProjectReferenceDependenciesChecked(solutionFilePath, dependencyProjectFilePaths);
        }
Example #4
0
        /// <summary>
        /// Adds a project reference to the solution's dependencies folder, checking first to avoid adding duplicates.
        /// </summary>
        public static void AddProjectReferenceDependencyChecked(this SolutionFile solutionFile, string solutionFilePath, string projectFilePath)
        {
            var projectReference = SolutionFileProjectReference.NewNetCoreOrStandard(solutionFilePath, projectFilePath);

            solutionFile.AddProjectReferenceDependencyChecked(projectReference);
        }