Question: 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

Answer: 
See the answer to this question
[MS-Build BeforeBuild not firing](https://stackoverflow.com/questions/3352228/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.
You need to properly override the Before build target. The easiest way to do it is to insert the override before tag, or declare this task as DefaultTargets.

```
<Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
    <!-- Override TFS build targets and run custom made ones -->
  <Target Name="BeforeCompile" DependsOnTargets="VersionAssemblies"></Target>
  <Target Name="AfterCompile" DependsOnTargets="GetTime;RunTests;CreateHTMLReport;Mail"></Target>
  <Target Name="AfterDropBuild" DependsOnTargets="RemovePrevContent;CopySrcBinaries;ZipBinPackages;CopyAllContent;RemoveBindings"></Target>

</Project>

```