2 out of 4 rated this helpful - Rate this topic

How to: Update Existing Templates

After you create a template and compress the files into a .zip file, you may want to modify the template. You can do this by manually changing the files in the template, or by exporting a new template from a project that is based on the template.

Visual Studio provides an Export Template wizard that can be used to update an existing template.

To use Export Template to update an existing template

  1. On the File menu, click New and then click New Project.

  2. Select the template that you want to update, enter a name and location for your temporary project, and click OK.

  3. Modify the project in Visual Studio.

  4. On the File menu, click Export Template, and use the Export Template wizard to create a new template.

  5. After the updated template is compressed into a .zip file, delete the old template .zip file.

You can update an existing template outside Visual Studio by modifying the files in the compressed .zip file.

To manually update an existing template

  1. Locate the .zip file that contains the template. By default, this file is located in \My Documents\Visual Studio 2010\My Exported Templates\.

  2. Extract the .zip file.

  3. Modify or delete the current template files, or add new files to the template.

  4. Open, modify, and save the .vstemplate XML file to handle updated behavior or new files. For more information about the .vstemplate schema, see Visual Studio Template Schema Reference.

  5. Select the files in your template, right-click, click Send To, and then click Compressed (zipped) Folder. The files that you selected are compressed into a .zip file.

  6. Put the new .zip file in the same directory as the old .zip file.

  7. Delete the extracted template files and the old template .zip file.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Try running DevEnv
@bodde, try running

devenv /installvstemplates

after modifying the template.
Thanks
I am so happy this feature is available.  Closing VS 2010 and performing a search I was able to locate my template project. 
I'm creating a web project  that is very dependent on a javascript library.
 No need to add folders and copy javascript files into a new web project. Excellent.

Note:
Step 2 refers to unzipping your new custom template via \Templates\ProjectTemplates\ within your Document directory
No effect changing manually the template
I tried to follow the steps in order to change manually the template in the specified folder "My Exported Templates" folder.
But no effect on my new projects!
To make the changes effective I had to work on the template in my "Documents\Visual Studio 2010\Templates\ProjectTemplates" folder.
Advertisement