Administering a team build
Questions derived from the 70-510 - TS: Visual Studio 2005 Team Foundation Server Microsoft Self-Test Software Practice Test.
Objective: Administering a team build
SubObjective: Extend the team build by using a custom task
Item Number: 70-510.5.4.4
Single Answer, Multiple Choice
You are the project lead of a software development team in your organization. You create a custom task to run with the build operation. You check out the TfsBuild.proj file and register the custom task.
What step should you perform next?
- Use the ITask interface
- Save and check in the TfsBuild.proj file
- Add the Target element to the TfsBuild.proj file
- Add the UsingTask element to the TfsBuild.proj file
C. Add the Target element to the TfsBuild.proj file
You should add the Target element to the TfsBuild.proj file. Adding the Target element is required to call the custom task to run with the build operation at a specified point. You should use the following syntax to add a Target element:
Where TargetName is the name of the target at which the task should be performed. For example, if the target name is specified as AfterClean then the task will run after the clean operation is completed.
You should not use the ITask interface. The ITask interface is used to create a custom task and not to register it. You can directly implement the ITask interface to define a task that can be used by the MSBuild to perform build operations.
You should not save and check in the TfsBuild.proj file. Saving and checking in the TfsBuild.proj file is the last step after creating, registering, and configuring the task to run with the build operation.
You should not add the UsingTask element to the TfsBuild.proj file. This element is used to register the task to make it available to the build type by mapping the custom task to the assembly that includes the task's implementation. In this scenario, this process has already been implemented. To register a custom task, you should check out and open the TfsBuild.proj build file and add the following code syntax to the file:
MSDN Library > Development Tools and Languages > Visual Studio 2005 > Visual Studio Team System > Team Foundation > Team Foundation Administrators > Customizing Team Foundation Build > Walkthrough: Customizing Team Foundation Build with a Custom Task