title: Is there a way to easily output the current time in MSBuild (version 3.5)?
body: <p>I'd like to output the current time (preferably before every task or at minimum when starting/completing every target) when invoking MSBuild 3.5.</p>
  
  <p>I tried creating a target that I would continually call that looks like:</p>
  
  <pre><code>&lt;Target Name="EchoTime"&gt;
      &lt;Time Format="yyyy-MM-dd HH:mm:ss.fff"&gt;
          &lt;Output TaskParameter="FormattedTime" PropertyName="currentTime" /&gt;
      &lt;/Time&gt;
      &lt;Message Text = "$(currentTime)" /&gt;
  &lt;/Target&gt;
  </code></pre>
  
  <p>...but it turns out that one target can only call another target once per execution.</p>
  
  <p>So if I try...</p>
  
  <pre><code>&lt;Target Name="TimeTest" &gt;
      &lt;Message Text = "--------------------------------------------------" /&gt;
      &lt;CallTarget Targets="EchoTime" /&gt;
      &lt;Message Text = " " /&gt;
      &lt;Message Text = "Try calling EchoTime again" /&gt;
      &lt;Message Text = " " /&gt;
      &lt;CallTarget Targets="EchoTime" /&gt;
      &lt;Message Text = "--------------------------------------------------" /&gt;
  &lt;/Target&gt;
  </code></pre>
  
  <p>Then the output looks like...</p>
  
  <pre><code>Build started 10/12/2011 2:24:52 PM.
  Project "C:\Temp\MSBuildSandbox\MSBuild_EchoTime.xml" on node 0 (TimeTest target(s)).
    --------------------------------------------------
  EchoTime:
    2011-10-12 14:24:52.756
  TimeTest:
  
    Try calling EchoTime again
  
    --------------------------------------------------
  Done Building Project "C:\Temp\MSBuildSandbox\MSBuild_EchoTime.xml" (TimeTest target(s)).
  </code></pre>
  
  <p>Anyone know an easy way to achieve this?</p>