Post build events are defined in the project file. If you open it up in a text editor (because you don't trust what VS is showing you) then you'll see the commands to be run. That is what MSBuild will run. Post build events are simply a custom Target that is inserted into the project file that executes after the build. So anything inside that target will run.
But given the messaging it appears you are building a C++ project. It is useful to mention this (or tag it) when posting so we have some context. In .NET projects you have a single pre/post-build for all configurations/platforms. But C++ allows a separate set of tasks for each configuration/platform combination. Therefore my gut instinct is that what you're looking at in the UI is the Debug/x86 settings. But when you build the solution the solution is compiling the project using Debug/x64. That configuration/platform combination uses a different set of options.
In the UI at the top of the build events editor is the configuration/platform that it is specified for. Change to the configuration/platform you are building and check the tasks to make sure they line up with what you expect. Note that you'll need to do this for each configuration/platform you want to use.
Now right click the solution in Solution Explorer and select the Configuration Manager option. In that UI is the solution's configuration/platform mappings. When you build/debug in VS it is using the solution's configuration/platform settings, not the projects. The Configuration Manager UI shows you what configuration/platform is being built for each project in the solution. Ensure that they line up with what you expect. For example most of the time the solution's Debug/x86 mapping should build each project's Debug/x86 mapping. However there are exceptions.
Ensure the solution mapping you're building is using the project's mappings that you expect and thus the build events associated with that mapping in the project are correct.