skip to Main Content

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


  1. Chosen as BEST ANSWER

    I used the 'Release' Instead 'Debug' the problem is solved now, but I'm not sure again later cause problems or not.


  2. 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:

    #if DEBUG              
         void myOffendingCodeBlock() {
    #endif
        ... // the original code
    #if DEBUG              
         } myOffendingCodeBlock();
    #endif
    

    Clearly, this will only work when there are no goto’s that jump out of the code block.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search