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?

 

 

  1. Use the ITask interface
  2. Save and check in the TfsBuild.proj file
  3. Add the Target element to the TfsBuild.proj file
  4. Add the UsingTask element to the TfsBuild.proj file

 

Answer:
C. Add the Target element to the TfsBuild.proj file

 

Tutorial:
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:

 

<Target Name=”TargetName”>
<TaskName/>
</Target>

 

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:

 

<UsingTask
TaskName=”TaskName”
AssemblyName=”AssemblyName”/>

 

Reference:
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

Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
cmadmin

ABOUT THE AUTHOR

Posted in Archive|

Comment: