title: MSBuild and BuildUri
body: <p>I am trying to add a BuildStep to the AfterBuild target in MSBuild and I am using the following </p>
  
  <pre><code>&lt;Target Name="AfterCompile"&gt;    
      &lt;ItemGroup&gt;      
          &lt;TestAssemblies Include="$(OutDir)\DataStoreUnitTests.dll" /&gt;   
      &lt;/ItemGroup&gt;    
  
      &lt;BuildStep      
          Name="Run unit Tests"
          TeamFoundationServerUrl="$(TeamFoundationServerUrl)"     
          BuildUri="$(BuildUri)"      
          Message="Running unit tests"&gt;      
          &lt;Output TaskParameter="Id" PropertyName="StepId" /&gt;    
      &lt;/BuildStep&gt;    
  
      &lt;Gallio      
          Assemblies="@(TestAssemblies)"      
          ReportTypes="html"      
          ReportFileNameFormat="buildreport{0}{1}"      
          ReportOutputDirectory="." /&gt;    
  
      &lt;BuildStep      
          TeamFoundationServerUrl="$(TeamFoundationServerUrl)"      
          BuildUri="$(BuildUri)"      
          Id="$(StepId)"      
          Message="Yay! All tests succeded!"      
          Status="Succeeded" /&gt;    
          &lt;OnError ExecuteTargets="MarkBuildStepAsFailed" /&gt;  
      &lt;/Target&gt;  
  
      &lt;Target Name="MarkBuildStepAsFailed"&gt;    
          &lt;BuildStep      
              TeamFoundationServerUrl="$(TeamFoundationServerUrl)"      
              BuildUri="$(BuildUri)"      
              Id="$(StepId)"      
              Message="Tests have failed. See test report in drop folder for details." 
              Status="Failed" /&gt;  
  &lt;/Target&gt;
  </code></pre>
  
  <p>And when I run it in MSBuild I get the following error:</p>
  
  <blockquote>
    <p>error MSB4044: The "BuildStep" task was not given a value for the required 
    parameter "BuildUri".</p>
  </blockquote>
  
  <p>And I cannot see why, does anyone know?</p>