Coding Towards Utopia...by Rob Reynolds

If you’ve ever built a .NET application that runs out of memory constantly, it’s because you are hitting a 2GB limit. You may have known about marking an assembly “/largeaddressaware”. You may have not. The process of doing this is actually somewhat easy once you learn about it. You normally just start a Visual Studio Command Prompt (found in Start Menu under Microsoft Visual Studio version/Visual Studio Tools). Then you find the compiled application and run the following command:

editbin /largeaddressaware yourassembly.exe

That’s really all you need to do get more memory out of your application. There are some great resources on how and why in the two blog posts below.

Getting UppercuT to Automatically Mark an Assembly for More Than 2GB of Memory

We are going to make a custom AFTER task for the compile step of UppercuT. With that we are going to specify the executable to mark. When the application is built (on the build server), it is marked for address large amounts of freakin memory. *grin*

1. If you do not have a BuildScripts.Custom folder, create one.

2. In that folder we need to create a file named “_compile.post.build.”