Parameter Element

 

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

For the latest documentation on Visual Studio 2017, see Parameter Element on docs.microsoft.com. Contains information about a specific parameter for a task that is generated by a UsingTask``TaskFactory. The name of the element is the name of the parameter. For more informations, see UsingTask Element (MSBuild).

<Project>
<UsingTask>
<ParameterGroup>
<Parameter>

<ParameterGroup ParameterType="SystemType"  
    Output="true/false"  
    Required="true/false" />  

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

Attributes

AttributeDescription
ParameterTypeOptional attribute.

The .NET type of the parameter, for example, "System.String".
OutputOptional Boolean attribute.

If true, this parameter is an output parameter for the task. By default, the value is false.
RequiredOptional Boolean attribute.

If true, this parameter is an required parameter for the task. By default, the value is false.

Child Elements

None.

Parent Elements

ElementDescription
ParameterGroupContains an optional list of parameters that will be present on the task that is generated by a UsingTask``TaskFactory.

The following example shows how to use the Parameter element.

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

Tasks
Task Reference
Project File Schema Reference

Show: