1

Is there any way to force Clean action as a Post / Pre build event for single project in Visual Studio?

Thank you.

Yippie-Ki-Yay
  • 22,026
  • 26
  • 90
  • 148

2 Answers2

1

Yes,

  1. right-click on your project in Solution Explorer and click Properties
  2. go to Build events, then Pre-Build Events
  3. put

    del /F /Q $(TargetDir)*.*

    in command line section.

MBZ
  • 26,084
  • 47
  • 114
  • 191
0

This pre-build event works too :

devenv ${ProjectFileName} /Clean
KeatsPeeks
  • 19,126
  • 5
  • 52
  • 83