This causes preprocessor conditions to not works at all and probably other problems.
Here an example of a fix
for (int i = 0; i < lines.Count; i++)
{
var line = lines[i];
if (!string.IsNullOrEmpty(line) && line[0] == '{' && line.Contains('}'))
{
lines[i] = line.Substring(line.IndexOf("}") + 1);
}
}