title: Overridden AfterBuild target in MSBuild script is not executed
body: <p>I have a very simple MSBuild script that builds a bunch of .sln files:</p>
  
  <pre><code>&lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
      &lt;!-- Builds all *.sln files under this repository. --&gt;
      &lt;ItemGroup&gt;
          &lt;SolutionFiles Include="**/*.sln" /&gt;
      &lt;/ItemGroup&gt;
  
  
      &lt;Target Name="Build"&gt;
          &lt;MSBuild Projects="@(SolutionFiles)" Targets="Rebuild" /&gt;
      &lt;/Target&gt;   
  
      &lt;Target Name="AfterBuild"&gt;
          &lt;Message Text="After Build" /&gt;
      &lt;/Target&gt;
  
      &lt;Target Name="AfterRebuild"&gt;
          &lt;Message Text="After Rebuild" /&gt;
      &lt;/Target&gt;   
  
  &lt;/Project&gt;
  </code></pre>
  
  <p>The AfterBuild/AfterRebuild targets should do something else, i am just testing them now.</p>
  
  <p>I'd like these targets to fire after every project build, but these are not fired.</p>
  
  <p>Am i doing something wrong?</p>
  
  <p>EDIT: Since each project defines its own AfterBuild target, i guess this way wouldn't really work.
  I tried placing the <em>AfterBuild</em> and <em>AfterRebuild</em> targets in their own file (custom.targets) and running MSBuild with /<em>p:CustomAfterMicrosoftCommonTargets</em>=custom.targets. This also did not work.</p>
  
  <p>Any suggestions?</p>