static IEnumerable<string> ProcessLines( IEnumerable<string> lines, IEnumerable<SolutionProject> projects )
{
bool inSection = false;
foreach( var line in lines )
{
if( inSection )
{
if( !projects.Any( p => line.Contains( p.Id ) ) ) yield return line;
inSection = !line.Contains( "EndGlobalSection" );
}
else
{
yield return line;
inSection = line.Contains( "GlobalSection(ProjectConfigurationPlatforms) = postSolution" );
}
}
}