Run 32bit .Net application with >2GB RAM on 64bit machine

To allow your 32bit application use more than 2GB of RAM you need to modify the *.exe file with editbin utility. (open ‘Visual Studio Command Prompt’ and it will be on the path)

editbin /LARGEADDRESSAWARE <your-app.exe>

or just add these 2 lines to your Post-build event in Visual Studio

call "$(DevEnvDir)..\tools\vsvars32.bat"
editbin /LARGEADDRESSAWARE "$(TargetPath)"

or these if you are building your project with msbuild outside of Visual Studio

call "%VS100COMNTOOLS%\vsvars32.bat"
editbin /LARGEADDRESSAWARE "$(TargetPath)"

To check if all ok run dumpbin utility as below and check if the output has ‘Application can handle large (>2GB) addresses’ text in FILE HEADER VALUES.

dumpbin /headers <your-app.exe>

Comments

Popular posts from this blog

Tibco Rendezvous (tibrv) C# .Net example

Parse XML to dynamic object in C#