예제 #1
0
        /// <summary>
        /// Creates a new <see cref="SolutionConfigurationPlatformsGlobalSection"/> with the <see cref="SolutionConfigurationPlatformsGlobalSection.GlobalSectionName"/> and <see cref="PreOrPostSolution.PreSolution"/>.
        /// Adds all default <see cref="SolutionBuildConfigurationPlatform"/> values.
        /// </summary>
        public static SolutionConfigurationPlatformsGlobalSection NewAddDefaultSolutionBuildConfigurationPlatforms()
        {
            var output = SolutionConfigurationPlatformsGlobalSection.New();

            output.AddDefaultSolutionBuildConfigurationPlatforms();

            return(output);
        }
예제 #2
0
        public static SolutionConfigurationPlatformsGlobalSection CreateSolutionConfigurationPlatformsGlobalSection()
        {
            var solutionConfigurationPlatforms = SolutionConfigurationPlatformsGlobalSection.New();

            solutionConfigurationPlatforms.AddDefaultSolutionBuildConfigurationPlatforms();

            return(solutionConfigurationPlatforms);
        }
예제 #3
0
        /// <summary>
        /// Creates a new <see cref="SolutionConfigurationPlatformsGlobalSection"/> with the <see cref="SolutionConfigurationPlatformsGlobalSection.GlobalSectionName"/> and <see cref="PreOrPostSolution.PreSolution"/>.
        /// </summary>
        public static SolutionConfigurationPlatformsGlobalSection New()
        {
            var output = new SolutionConfigurationPlatformsGlobalSection
            {
                Name = SolutionConfigurationPlatformsGlobalSection.GlobalSectionName,
                PreOrPostSolution = PreOrPostSolution.PreSolution,
            };

            return(output);
        }
예제 #4
0
 public static void AddDefaultSolutionBuildConfigurationPlatforms(this SolutionConfigurationPlatformsGlobalSection solutionConfigurationPlatformsGlobalSection)
 {
     solutionConfigurationPlatformsGlobalSection.SolutionBuildConfigurationMappings.AddRange(new[]
     {
         new SolutionBuildConfigurationPlatform {
             Source = BuildConfigurationPlatform.DebugAnyCPU, Destination = BuildConfigurationPlatform.DebugAnyCPU
         },
         new SolutionBuildConfigurationPlatform {
             Source = BuildConfigurationPlatform.DebugX64, Destination = BuildConfigurationPlatform.DebugX64
         },
         new SolutionBuildConfigurationPlatform {
             Source = BuildConfigurationPlatform.DebugX86, Destination = BuildConfigurationPlatform.DebugX86
         },
         new SolutionBuildConfigurationPlatform {
             Source = BuildConfigurationPlatform.ReleaseAnyCPU, Destination = BuildConfigurationPlatform.ReleaseAnyCPU
         },
         new SolutionBuildConfigurationPlatform {
             Source = BuildConfigurationPlatform.ReleaseX64, Destination = BuildConfigurationPlatform.ReleaseX64
         },
         new SolutionBuildConfigurationPlatform {
             Source = BuildConfigurationPlatform.ReleaseX86, Destination = BuildConfigurationPlatform.ReleaseX86
         },
     });
 }
예제 #5
0
        public static bool HasSolutionConfigurationPlatformsGlobalSection(this IEnumerable <ISolutionFileGlobalSection> globalSections, out SolutionConfigurationPlatformsGlobalSection solutionConfigurationPlatformsGlobalSection)
        {
            var output = globalSections.HasGlobalSectionByName(SolutionConfigurationPlatformsGlobalSection.GlobalSectionName, out solutionConfigurationPlatformsGlobalSection);

            return(output);
        }
        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,
                    });
                }
            }
        }