Solutionizer.Commands.SaveSolutionCommand.WriteSolutionConfigurationPlatforms C# (CSharp) Method

WriteSolutionConfigurationPlatforms() private method

private WriteSolutionConfigurationPlatforms ( TextWriter writer, IEnumerable projects ) : void
writer System.IO.TextWriter
projects IEnumerable
return void
        private void WriteSolutionConfigurationPlatforms(TextWriter writer, IEnumerable<SolutionProject> projects)
        {
            writer.WriteLine("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution");
            foreach (var configuration in projects.SelectMany(p => p.Configurations).Distinct()) {
                var fixedConfigurationNameBecauseOfA3YearsOldBugInVisualStudio = configuration.Replace("AnyCPU", "Any CPU");
                writer.WriteLine("\t\t{0} = {0}", fixedConfigurationNameBecauseOfA3YearsOldBugInVisualStudio);
            }
            writer.WriteLine("\tEndGlobalSection");
        }