Fixing Visual Studio’s System.OutOfMemoryException

Over the last little while Visual Studio 2005 has been crashing seemingly “randomly”. Sometimes it would happen when just trying to open a source file, other times when trying to debug a web app. A few co-workers asked if I wanted to try ReSharper, so I installed that. After installation crashing seemed much more frequent, so I went into Add-in Manager and disabled ReSharper.

My machine at work has 4GB of memory, and is running Windows XP. So I had assumed I had more than enough memory available for VS 2005 to use.

I had almost given up on fixing the issue, but yesterday came across the following blog post by Steven Harman titled Hacking Visual Studio to Use More Than 2Gigabytes of Memory.

Basically the solution was to boost the user-mode memory from 2GB to 3GB in XP via adding the /3GB to your BOOT.ini file, then making Visual Studio “Large Address” aware using the editbin command.

Comments are closed.