title | description | ms.date | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | author | ms.author | manager | |
---|---|---|---|---|---|---|---|---|---|---|
CustomParameter Element (Visual Studio Templates) |
Learn about the CustomParameter element and how it contains a custom parameter name and value to use when a project or item is created from the template. |
11/04/2016 |
general-ide |
reference |
|
maiak |
maiak |
mijacobs |
Contains a custom parameter name and value to use when a project or item is created from the template.
<CustomParameter Name="name" Value="value">
The following sections describe attributes, child elements, and parent elements.
Attribute | Description |
---|---|
Name |
Required. The name of the parameter. The format for parameters is $name$. |
Value |
Required. The replacement value for the parameter. |
None.
Element | Description |
---|---|
CustomParameters | Groups the custom parameters that are to be passed to the template wizard when the wizard makes parameter replacements. |
When a template contains CustomParameter
elements, every instance the Name
attribute is replaced with the Value
attribute in the created project or item files.
The following example shows how to use several custom parameters in a template. When a project or item is created from a template with the following custom parameters, all instances of $color1$
and $color2$
in the template files will be replaced with Red
and Blue
, respectively.
<CustomParameters>
<CustomParameter Name="$color1$" Value="Red"/>
<CustomParameter Name="$color2$" Value="Blue "/>
</CustomParameters>