I\'m building a number of projects via a script, and the occasional use of custom build events causes a great deal of difficulty for the build system. If it is possible, I\
Pre/PostBuildEvents are properties, so to override them just set them from command line to empty string.
msbuild foo.sln /p:PreBuildEvent= /p:PostBuildEvent=