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

后端 未结 6 425
攒了一身酷
攒了一身酷 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 16:53

    For Visual C++ projects, you need to add the files to the "Extensions to Delete On Clean" section under the "General" project configuration properties. Even though it claims to want extensions, it's actually using globs and will happily accept full paths and expand MSBuild variables. This worked for me:

    $(ProjectDir)\deployment\*.*

    I'm not sure if you can remove directories this way, but it can at least get the files.

提交回复
热议问题