I created a C# application with some large string constants and whenever I
try to build the solution the compiler crashes with no error message. On
further analysis the problem seems to occur when the string constant has
around 2100 character. I tried changing the constant declaration to a string
variable declaration and it works fine.
Any ideas?
The following code can be used to reproduce the error:
const string TEST =
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890" +
"12345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 01234567890";
Regards
Gnik