TaskBody Element (MSBuild)


For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see TaskBody Element (MSBuild) on docs.microsoft.com. Contains the data that is passed to a UsingTask``TaskFactory. For more information, see UsingTask Element (MSBuild).


<TaskBody Evaluate="true/false" />  

The following sections describe attributes, child elements, and parent elements.


EvaluateOptional Boolean attribute.

If true, MSBuild evaluates any inner elements, and expands items and properties before it passes the information to the TaskFactory when the task is instantiated.

Child Elements

DataThe text between the TaskBody tags is sent verbatim to the TaskFactory.

Parent Elements

UsingTaskProvides a way to register tasks in MSBuild. There may be zero or more UsingTask elements in a project.

The following example shows how to use the TaskBody element with an Evaluate attribute.

<UsingTask TaskName="MyTask" AssemblyName="My.Assembly" TaskFactory="MyTaskFactory">  
              <Parameter1 ParameterType="System.String" Required="False" Output="False"/>  
              <Parameter2 ParameterType="System.Int" Required="True" Output="False"/>  
       <TaskBody Evaluate="true">  
      ... Task factory-specific data ...  

Task Reference
Project File Schema Reference