ProjectItem is an optional child of TemplateContent.
The TargetFileName attribute can be used to rename files with parameters. For example, if the file MyFile.vb exists in the root directory of the template .zip file, but you want the file to be named based on the file name provided by the user in the Add New Item dialog box, you would use the following XML:
|
<ProjectItem TargetFileName="$fileinputname$.vb">MyFile.vb</ProjectItem> |
When an item is created from this template, the file name will be based on the name the user entered in the Add New Item dialog box. This is useful when creating multi-file item templates. For more information, see How to: Create Multi-file Item Templates and Template Parameters.