Problem:
I can’t see my custom build steps in the list of build steps
during a team build.
Solution:
Use BuildStep element in tfsbuild.proj file.
Code:
<Target Name="MyCustomTarget">
<BuildStep
TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" Name="TestBuildStep" Message="Running BVTs">
<Output
TaskParameter="Id" PropertyName="TestBuildStepId" />
</BuildStep>
. . .
<BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" Id="$(TestBuildStepId)" Status="Succeeded" />
<OnError ExecuteTargets="OnTestTargetFail" />
</Target>
<Target Name="OnTestTargetFail">
<BuildStep
TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" Id="$(TestBuildStepId)" Status="Failed" />
</Target>
Explanation:
Now when I run my builds I can see my custom steps with a
Play icon while running and a check or X when finished. As you can see below you can see the Running
BVTs build step. The “Copying files to
IIS.” was also added this way.

Additional information about the BuildStep element can be
found here http://msdn.microsoft.com/en-us/library/bb399129.aspx
42301ccf-f805-43dd-8e18-be159e90b219|0|.0