Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSBuild Target BeforeBuild not Executing

I seem to have a situation where code that I put into the BeforeBuild target is not successfully executing.

Here is what I have:

<Target Name="BeforeBuild" >
    <Message Text="Before Build" />
</Target>

I can’t see the message output in the build log when the build runs. Is there something wrong with the way I’ve formatted this, or does it have to be in a specific place in the script? Am I even looking in the correct place for these messages?

EDIT: changing the importance to high seems to make no difference

like image 490
Paul Michaels Avatar asked Jun 28 '10 10:06

Paul Michaels


1 Answers

See the answer to this question MS-Build BeforeBuild not firing

You just need to move the BeforeBuild target so that it appears after the line that imports Microsoft.CSharp.targets.

like image 140
Jose Lamas Ríos Avatar answered Nov 07 '22 21:11

Jose Lamas Ríos