Pre-build event - Kill Process Before Build

Just in case you don’t have Clarion Enterprise Edition here is a neat little incantation that you can use to kill the output exe process before the build occurs:

taskkill /f /im $(OutputName).exe /fi "memusage gt 40"

Put that in your main project pre-build command window and voilà!

Oh, and in case you are curious this topic discusses other kinds of things you can do with pre/post events: Get Compiler Version & Build Config for use in a PostCompile Build action