CustomParameters Element (Visual Studio Templates)


This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Groups the custom parameters that are to be passed to the template wizard when the wizard makes parameter replacements.



Attributes and Elements

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



Child Elements

Element Description
CustomParameter Optional element.

Contains a custom parameter name and value to use when a project or item is created from the template. There may be zero or more CustomParameter elements in a CustomParameters element.

Parent Elements

Element Description
TemplateContent Specifies the contents of the template.



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.

    <CustomParameter Name="$color1$" Value="Red"/>  
    <CustomParameter Name="$color2$" Value="Blue "/>  

See Also

CustomParameter Element (Visual Studio Templates)
Template Parameters
Visual Studio Template Schema Reference