How to create custom clean (post-clean) event in Visual Studio 2008?

后端 未结 6 426
攒了一身酷
攒了一身酷 2020-12-28 16:34

In our build process, for each project we use Post Build events to copy our executable files into a separate deployment directory. That works just peachy, but the problem i

6条回答
  •  星月不相逢
    2020-12-28 17:06

    If you use "Project Properties --> Configuration Properties --> Custom Build Setup" you have to remember to fill in the 'Outputs' field, otherwise the it won't run.

    from:

    http://blogs.msdn.com/b/visualstudio/archive/2010/04/26/custom-build-steps-tools-and-events.aspx

    "The Outputs property is a semicolon-delimited list of files, and must list whatever files are generated as part of the execution of your custom build step. If you leave your Outputs property empty, your Custom Build Step will never execute, since MSBuild will determine that no outputs are out of date. If your step doesn’t generate files but you still want it to execute with every build, making up a fake filename will do the trick, since that file will never exist and MSBuild will always determine that the custom build step is out of date."

提交回复
热议问题