I have developed an C#.Net console application using Telegram Bot API.
The ProcessUpdates.cs file is now approximately 2.11Mb and has around 30500 line of code.
I am getting the following error, when I trying build the project:
unexpected error writing debug information — insufficient memory to continue to execution of the program.
-
I’ve found only one instance of this error in This Link, But I did not get any results of its response.
-
Using Visual Studio 2015 Update-2 in Windows 10 x64 with 8Gb of memory.
2
Answers
I used the 'Release' Instead 'Debug' the problem is solved now, but I'm not sure again later cause problems or not.
I had a 77k Lines program source within VS2017 which caused the same error.
The offending source was generated using a program that I wrote.
I solved the issue in splitting up a 50k lines C# method the source contained, by adding these 6 lines around a 23K lines code block within the method:
Clearly, this will only work when there are no goto’s that jump out of the code block.