Building big projects in Visual Studio

By | 2008-01-03

For a project at work we were building deployment projects for some fairly large web applications. 300-600 MB after compression on disk. When the deployment project would build, it would fail with the following result:

“ERROR: Could not find file ‘xxxxx.xxx ‘Not enough storage is available to complete this operation.'”

After googling around, I found this was an out of memory error, which surprized me, as we were building the project on machines with 4 GB of physical RAM and > 100 GB free on a hard drive. Surely a 600 MB install shouldn’t max out those limits even using temporary space during compression!

Some suggested rebooting, or restarting Visual Studio, which did help with some of the smaller builds, but the bigger ones still failed.

Finally, a coworker of mine, Kevin (way to go!), tracked down what was really going on. There is apparently a hard limit of memory per process in windows of 2 GB. And between everything else that was going on in visual studio and our compression process, we were just barely crossing this threshold. The following resolution solved our problem by increasing the limit to 3 GB.

  1. Backup the boot.ini file. Then, put the /3GB switch in your boot.ini For more information on the /3GB option, please check the following article: Memory Support and Windows Operating Systems: http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx
  2. Make DEVENV large address aware.
    1. Open up a VS 2005 command prompt
    2. Change directory to the Microsoft Visual Studio 8Common7IDE directory.
    3. Backup devenv.exe file.
    4. Type and execute the following command line: “editbin /LARGEADDRESSAWARE devenv.exe”
  3. Reboot Windows and Build.

After doing this, the build succeeded with no problem.

One thought on “Building big projects in Visual Studio

  1. Ervin

    I’ve had the same issue with a smaller MSI of about 170MB after compression on disk. Part of this build includes a 190MB database.

    I followed your steps and my MSI built without any issues.

    Thanks for sharing!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *