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
Copy file name to clipboardExpand all lines: docs/ide/how-to-update-existing-templates.md
+19-5Lines changed: 19 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -25,28 +25,42 @@ After you create a Visual Studio project or item template by compressing the tem
25
25
You can use the Visual Studio **Export Template Wizard** to update an existing template.
26
26
27
27
1. Choose **File** > **New** > **Project** from the menu bar.
28
-
1. Select an existing project template that you want to update, and create the new project.
28
+
29
+
1. Select an existing project template that you want to update, and create a new project.
30
+
29
31
1. Modify the project in Visual Studio. For example, change the output type or add a new file to the project.
32
+
30
33
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.
34
+
31
35
1. On the **Project** menu, choose **Export Template**. The **Export Template Wizard** opens.
32
-
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.
33
-
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.
36
+
37
+
1. Select either **Project Template** or **Item Template** on the **Template Type** page, depending on which one you want to export.
38
+
39
+
1. Follow the prompts in the wizard to export the template as a *.zip* file.
40
+
41
+
1. If you select the option to **Automatically import the template into Visual Studio**, the wizard places the *.zip* file at *%USERPROFILE%\Documents\Visual Studio \<version\>\Templates* in the *\\ProjectTemplates* or *\\ItemTemplates* folder to make it available for future projects. If you don't select this option, paste the *.zip* file in the user template location manually.
42
+
34
43
1. Delete the old template *.zip* file if necessary.
35
44
36
45
## Manually update an existing template
37
46
38
47
You can update an existing template without using the **Export Template Wizard** by manually modifying the files in the template *.zip* file.
39
48
40
-
1. Locate the *.zip* file that contains the template. User templates are located at *%USERPROFILE%\Documents\Visual Studio \<version\>\Templates\ProjectTemplates* or *\\ItemTemplates*.
49
+
1. Locate the *.zip* file that contains the template. User templates are located at *%USERPROFILE%\Documents\Visual Studio \<version\>\Templates* in *\\ProjectTemplates* or *\\ItemTemplates*.
50
+
41
51
1. Extract the *.zip* file.
52
+
42
53
1. Modify or delete the current template files, or add new files to the template.
54
+
43
55
1. Open, modify, and save the *.vstemplate* XML file to handle updated behavior or new files.
44
56
45
57
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).
46
58
47
59
1. In Windows Explorer, select the files for your template, including the *.vstemplate* file. Right-click the selection and select **Compress to** > **ZIP File**.
60
+
48
61
1. Copy the resulting *.zip* file and paste it in the same directory as the old *.zip* file.
49
-
1. Delete the extracted template files and delete the old template *.zip* file if necessary.
62
+
63
+
1. Delete the extracted template files, and delete the old template *.zip* file if necessary.
0 commit comments