Visual Studio project file difference between PostBuildEvent and AfterBuild target?

后端 未结 2 998
长发绾君心
长发绾君心 2020-12-05 17:55

can someone explain the differences between these:


    

and:

2条回答
  •  渐次进展
    2020-12-05 18:08

    Both PostBuildEvent and AfterBuild are MSBuild targets. The difference between the two is the conditions around when they are invoked

    • AfterBuild: This runs as the last action in the Build target and does so irrespective of whether or not a build succeeds. It runs after PostBuildEvent (if it runs at all)
    • PostBuildEvent: This runs conditionally after a build completes. When it runs is very configurable but in general it will only run if a build successfully completes and produces new output.

提交回复
热议问题