You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Use the Export Template Wizard and other manual processes in Visual Studio to update project item templates that you already created.
4
-
ms.date: 01/02/2018
2
+
title: Update existing project or item templates
3
+
description: Use the Visual Studio Export Template Wizard or a manual process to update existing project or item templates.
4
+
ms.date: 04/14/2025
5
5
ms.topic: how-to
6
6
helpviewer_keywords:
7
7
- item templates, updating
@@ -13,57 +13,41 @@ ms.author: ghogen
13
13
manager: mijacobs
14
14
ms.subservice: general-ide
15
15
---
16
-
# Update existing templates
16
+
# Update existing project or item templates
17
17
18
-
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's based on the template.
18
+
After you create a Visual Studio project or item template by compressing the template files into a *.zip* file, you might want to modify the template. This article explains how to modify an existing template by exporting a new template from a project that's based on the template, or by manually changing the files in the template.
19
19
20
20
## Use the Export Template Wizard
21
21
22
-
Visual Studio provides an **Export Template Wizard**that can be used to update an existing template:
22
+
You can use the Visual Studio **Export Template Wizard** to update an existing template.
23
23
24
24
1. Choose **File** > **New** > **Project** from the menu bar.
25
-
26
-
1. Select the template that you want to update and continue through the steps to create the new project.
27
-
25
+
1. Select an existing project template that you want to update, and create the new project.
28
26
1. Modify the project in Visual Studio. For example, change the output type or add a new file to the project.
29
-
30
-
1. On the **Project** menu, choose **Export Template**.
31
-
32
-
The **Export Template Wizard** opens.
33
-
34
-
1. Follow the prompts in the wizard to export the template as a *.zip* file.
35
-
36
-
1. (Optional) Place the *.zip* file in the following directory: *%USERPROFILE%\Documents\Visual Studio \<version\>\Templates\ProjectTemplates* to make it available for selection. You'll need to perform this step if you did not select the option **Automatically import the template into Visual Studio** in the **Export Template Wizard**.
37
-
38
-
1. Delete the old template *.zip* file.
27
+
1. To change an item template, select **Project** > **Add New Item**, and add the item template from the **Add New Item** dialog box. Make any changes you want in the item.
28
+
1. On the **Project** menu, choose **Export Template**. The **Export Template Wizard** opens.
29
+
1. Select either **Project Template** or **Item Template** on the **Template Type** page, and follow the prompts in the wizard to export the template as a *.zip* file.
30
+
1. If you select the option to **Automatically import the template into Visual Studio** in the **Export Template Wizard**, the wizard places the *.zip* file in the *%USERPROFILE%\Documents\Visual Studio \<version\>\Templates\ProjectTemplates* or *\\ItemTemplates* folder to make it available for selection in future projects. If you didn't select the option, paste the *.zip* file in the user template location manually.
31
+
1. Delete the old template *.zip* file if necessary.
39
32
40
33
## Manually update an existing template
41
34
42
-
You can update an existing template without using the **Export Template Wizard**, by modifying the files in the compressed *.zip* file.
43
-
44
-
### To manually update an existing template
45
-
46
-
1. Locate the *.zip* file that contains the template. User project templates are located at *%USERPROFILE%\Documents\Visual Studio \<version\>\Templates\ProjectTemplates*.
35
+
You can update an existing template without using the **Export Template Wizard** by manually modifying the files in the template *.zip* file.
47
36
37
+
1. Locate the *.zip* file that contains the template. User templates are located at *%USERPROFILE%\Documents\Visual Studio \<version\>\Templates\ProjectTemplates* or *\\ItemTemplates*.
48
38
1. Extract the *.zip* file.
49
-
50
39
1. Modify or delete the current template files, or add new files to the template.
51
-
52
40
1. Open, modify, and save the *.vstemplate* XML file to handle updated behavior or new files.
53
41
54
-
For more information about the *.vstemplate* schema, see [Visual Studio template schema reference (extensibility)](../extensibility/visual-studio-template-schema-reference.md). For more information about what you can parameterize in the source files, see [Template parameters](../ide/template-parameters.md).
55
-
56
-
1. Select the files in your template, and from the right-click or context menu, and choose **Send to** > **Compressed (zipped) folder**.
57
-
58
-
The files that you selected are compressed into a *.zip* file.
59
-
60
-
1. Put the new *.zip* file in the same directory as the old *.zip* file.
42
+
For more information about the *.vstemplate* schema, see [Visual Studio template schema reference (extensibility)](../extensibility/visual-studio-template-schema-reference.md). For more information about what you can parameterize in the source files, see [Template parameters](template-parameters.md).
61
43
62
-
1. Delete the extracted template files and the old template *.zip* file.
44
+
1. In Windows Explorer, select the files for your template, including the *.vstemplate* file. Right-click the selection and select **Compress to** > **ZIP File**.
45
+
1. Copy the resulting *.zip* file and paste it in the same directory as the old *.zip* file.
46
+
1. Delete the extracted template files and delete the old template *.zip* file if necessary.
0 commit comments