Here is the solution to fix it.
After following the above steps you can see your post build events working on your project.