Support for clean during PreBuildSteps

I have a prebuild step that launches a process that generates a number of files. When doing a clean or rebuild of the project, I would like to make sure those generated files are removed or rebuilt, but I don’t see a way to currently support this, as none of the TargetRules properties specifies that we are performing a clean. Is this something currently supported, or would this be a new feature?

Hi Paul,

It is currently not possible to know when the TargetRules object is being constructed when cleaning the target (in CleanMode.Clean). I logged a feature request so it is eventually possible to access that information in your Target.cs code.

One workaround might be to have your pre build step script look at the project’s intermediate folder to detect it’s been cleaned.

Regards,

Martin