public static void AddProjectConfigurations(this ProjectConfigurationPlatformsGlobalSection projectConfigurationPlatforms, Guid projectGUID, SolutionConfigurationPlatformsGlobalSection solutionConfigurationPlatforms) { var indicators = new[] { ProjectConfigurationIndicator.ActiveCfg, ProjectConfigurationIndicator.Build0, }; foreach (var solutionBuildConfigurationMapping in solutionConfigurationPlatforms.SolutionBuildConfigurationMappings) { var mappedSolutionBuildConfiguration = solutionBuildConfigurationMapping.Source.BuildConfiguration == BuildConfiguration.Debug ? BuildConfigurationPlatform.DebugAnyCPU : BuildConfigurationPlatform.ReleaseAnyCPU; foreach (var indicator in indicators) { projectConfigurationPlatforms.ProjectBuildConfigurationMappings.Add(new ProjectBuildConfigurationMapping { ProjectGUID = projectGUID, SolutionBuildConfiguration = solutionBuildConfigurationMapping.Source, MappedSolutionBuildConfiguration = mappedSolutionBuildConfiguration, ProjectConfigurationIndicator = indicator, }); } } }
/// <summary> /// Creates a new <see cref="ProjectConfigurationPlatformsGlobalSection"/> with the <see cref="ProjectConfigurationPlatformsGlobalSection.GlobalSectionName"/> and <see cref="PreOrPostSolution.PostSolution"/>. /// </summary> public static ProjectConfigurationPlatformsGlobalSection New() { var output = new ProjectConfigurationPlatformsGlobalSection { Name = ProjectConfigurationPlatformsGlobalSection.GlobalSectionName, PreOrPostSolution = PreOrPostSolution.PostSolution, }; return(output); }
public static bool HasProjectConfigurationPlatformsGlobalSection(this IEnumerable <ISolutionFileGlobalSection> globalSections, out ProjectConfigurationPlatformsGlobalSection projectConfigurationPlatformsGlobalSection) { var output = globalSections.HasGlobalSectionByName(ProjectConfigurationPlatformsGlobalSection.GlobalSectionName, out projectConfigurationPlatformsGlobalSection); return(output); }