none
Build Solution Error: Unexpected error writing debug information

    Question

  • Hi,

    Im rebuilding a working solution that's been working with other developers. I made a local copy with all source/code coming from Team Foundation Server.  Im using Visual Studio 2015.  Its using .Net Framework 4 built on C#./ When I did the rebuild, I got this error:

    Error  Unexpected error writing debug information -- 'Insufficient memory to continue the execution of the program.'

    Has anyone encountered this error?

    Thanks,

    Monday, May 02, 2016 5:16 PM

Answers

All replies

  • Hi JB_CPU,

    Thank you for posting in MSDN forum.

    Before you rebuild this project, please do a project clean to narrow down some potential useless string or chars that brings from TFS.

    >>Unexpected error writing debug information -- 'Insufficient memory to continue the execution of the program.

    There are some causes of this error information:

    1. Have you set the project URL on network disk or Virtual Memory?

    if so, please change a project path with sufficient memory(Drive D: or Drive E:) and rebuild it

    Or create a new template and copy the main source file from TFS and try to build it to see if it runs smoothly.

    1. This situation could also happen because of Visual Studio

    By default sets image’s ‘Build Action’ property to ‘Content’.

    You could check and this property, set ‘Build Action’ property to ‘None’

    Refer to

    http://www.codeproject.com/Tips/447904/Out-of-Memory-in-Visual-Studio  

    1.       what type is your project type? if it is a WPF application, this issue occurs because the application creates a new bitmap cache on every invalidation update instead of updating the existing cache.

    If so, you need to download the following hotfix:

    http://support.microsoft.com/contactus/?ws=support

    Refer to:

    https://support.microsoft.com/en-us/kb/2494124

    Besides, you could send a sample code to us, we will test on our side to see if the same error message shows.

    if the situation is the same as yours , I think the cause is pending on the project itself and we need to do more research on this concrete issue.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 03, 2016 8:35 AM
    Moderator
  • Thanks Weiwei for your reply.

    Project type is a class library containing C# code. All C# files build action is set to 'compile'

    Its able to compile the project from MSBuild.Exe (command line) but not from IDE VS2015. We installed VS2015 update 2 and same error. A collleage of mine updated the option 'Debug' to 'Release' ; 'Any CPU" and now it works.

    There something different with the 'Debug' option. Don't know why.

    Thanks.

     

    Tuesday, May 03, 2016 4:54 PM
  • Hi JB_CPU,

    >>A colleage of mine updated the option 'Debug' to 'Release' ; 'Any CPU" and now it works.

    So other members also get the same issue as yours in debug mode, am I right?

    “Debug” and “Release” are 2 separate configurations, each with its own settings.

    By default, Debug includes debug information in the compiled files (allowing easy debugging) while Release usually has optimizations enabled.

    I think the cause is still related to the project itself, when you turn on “Release” mode, some potential problem are optimizations.

    About the difference between Release and Debug modes in Visual Studio, please refer to:

    http://stackoverflow.com/questions/933739/what-is-the-difference-between-release-and-debug-modes-in-visual-studio

    Since the project type is C#, you could also take a look at the Hans’s answer about the performance differences between debug and release builds:

    http://stackoverflow.com/questions/4043821/performance-differences-between-debug-and-release-builds

    Best Regards,
    Weiwei

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 04, 2016 6:08 AM
    Moderator