Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating MSBuild target hooks

Can someone please point me to a reference about target hooks in MSBuild?

I'm looking for something that will let me define targets to run before and after a specified target. I know this can be done using the DependsOnTargets property but I've seen references to using target hooks and I'd like to explore that area.

Thanks, Zain

like image 702
Zain Rizvi Avatar asked Sep 01 '25 10:09

Zain Rizvi


1 Answers

A good list of built-in overridable build process hooks can be found here. For custom targets, the only thing I can think of is to use either the DependsOnTarget attribute (like you mentioned) or the BeforeTargets/AfterTargets attribute (like @Ritch Melton mentioned.) Be careful, the BeforeTargets/AfterTargets are only available in MSBuild 4.0

like image 180
porusan Avatar answered Sep 04 '25 08:09

porusan