We have VS.Net solution with 20 projects in it.
Occasionaly, in VS.NET, when we try to build/debug our solution, we get following error:
Unknown build error, 'Exception of type 'System.OutOfMemoryException' was thrown
Only way to "fix" this issue is to reopen Visual Studio and then solution build goes well, but again after some time OutOfMemory exception occur again. It's really annoying to reopen Visual Studio couple times a day, so do you know some workaround for this issue ?
OutOfMemoryException Exception of type 'System. OutOfMemoryException' was thrown. To resolve this issue, I had to restart Visual Studio or go to the Windows Task Manager and terminate IIS Express process. This error could happen due to a variety of reasons related to memory consumption of the application.
To avoid this exception while working with StringBuilder, we can call the constructor StringBuilder. StringBuilder(Int32, Int32) and can set the MaxCapacity property to a value that will be large enough to serve the accommodation required when we expand the corresponding StringBuilder object.
OutOfMemoryException Class (System) The exception that is thrown when there is not enough memory to continue the execution of a program.
JetBrains is aware of this issue, and they provide some fix for it, using this fix solved my problems for now:
http://www.jetbrains.net/confluence/display/ReSharper/OutOfMemoryException+Fix
Edit: However, OutOfMemory exception is occuring again, but it's not as often as it is when I dont use this JetBrains fix.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With