Pre/PostBuildEvents are properties, so to override them just set them from command line to empty string.
msbuild foo.sln /p:PreBuildEvent= /p:PostBuildEvent=
Pre/PostBuildEvents are properties, so to override them just set them from command line to empty string.
msbuild foo.sln /p:PreBuildEvent= /p:PostBuildEvent=