Software

Custom Template Parameters

You can use the CustomParameter element in your .vstemplate file to add new parameters to a template.

  1. 1.Locate the TemplateContent element in the .vstemplate file for the template.
  2. 2.Add a CustomParameters element and one or more CustomParameter child elements as children of the TemplateContent element.
    Figure 1. Adding Custom Parameters
    <TemplateContent>
    ...
    <CustomParameters>
        <CustomParameter Name="$MyParameter1$" Value="MyValue2"/>
        <CustomParameter Name="$MyParameter2$" Value="MyValue2"/>
    </CustomParameters>
    </TemplateContent>
  3. 3.Use the parameter in one or more of the code files in the template, as shown in Default Template Parameters.