Building on @RouMao's answer, you may get an error message saying that editbin cannot be found. Ensure that the environment in the post-build event command line is setup properly by specifying as follows:
call "$(VS100COMNTOOLS)..\tools\vsvars32.bat"
editbin /largeaddressaware $(TargetPath)
Another thing to understand is that your LARGEADDRESSAWARE
enabled application will not run in debugging mode when (under the Debug
tab in your project properties) the Enable the Visual Studio hosting process
check-box is checked (which it is by default), because the vshost.exe
is not properly flagged.
Uncheck that box to debug your application using LARGEADDRESSAWARE
.
obj
folder and NOT the ones inbin
. To cover both normal build output (used for debugging / running locally) as well as ClickOnce publishes, you need to runeditbin
against both directories in the Post Build event. I'd also suggest wrapping theTargetPath
macro in quotes. – Serb