I have an after build event in my main TFSBuild.proj file that uses the MSBuild task to call a deployment task after a successful build. It looks like this:
<ItemGroup>
<DeploymentTargets Include="..\Sources\Build\SkunkWorks.Build.Deployment.targets">
<Properties></Properties>
</DeploymentTargets>
</ItemGroup>
<Target Name="AfterBuild">
<Message Text="Executing Deployment"/>
<MSBuild Projects="@(DeploymentTargets)"
Properties="PickUpLocation='@(DropLocation)'"
ContinueOnError="false"/>
</Target>
This works fine and the deployment script is called as you would expect. The problem is that any errors or messages produced by executing the MSBuild are not written to the BuildLog.txt or ErrorsAndWarnings.txt files that are placed in the drop location after a successful build.
Is there an easy way to capture this information?