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
+13-11Lines changed: 13 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -16,45 +16,47 @@ ms.subservice: general-ide
16
16
#customer intent: As a developer, I want to learn how to edit project and item templates in Visual Studio, so I can easily keep my templates up to date.
17
17
---
18
18
19
-
# Update existing project or item templates
19
+
# Update existing templates
20
20
21
-
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.
21
+
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 using the **Export Template Wizard** or by manually changing the files in the template.
22
22
23
23
## Use the Export Template Wizard
24
24
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
28
29
-
1. Select an existing project template that you want to update, and create a new project.
29
+
1. Select the project template you want. If you want to update an existing project template, select that template.
30
30
31
-
1. Modify the project in Visual Studio. For example, change the output type or add a new file to the project.
31
+
1. Follow the steps to create the new project.
32
+
33
+
1. To change the project template, modify the project in Visual Studio. For example, change the output type or add a new file to the project.
32
34
33
35
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
36
35
37
1. On the **Project** menu, choose **Export Template**. The **Export Template Wizard** opens.
36
38
37
-
1.Select either**Project Template**or **Item Template**on the **Template Type** page, depending on which one you want to export.
39
+
1.On the**Template Type**page, select either **Project Template**or **Item Template**, depending on which type you want to export.
38
40
39
41
1. Follow the prompts in the wizard to export the template as a *.zip* file.
40
42
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.
43
+
1. If you select the option to **Automatically import the template into Visual Studio**, the wizard places the *.zip* file in the *\\ProjectTemplates* or *\\ItemTemplates* folder at *%USERPROFILE%\Documents\Visual Studio \<version\>\Templates* 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
44
43
45
1. Delete the old template *.zip* file if necessary.
44
46
45
47
## Manually update an existing template
46
48
47
49
You can update an existing template without using the **Export Template Wizard** by manually modifying the files in the template *.zip* file.
48
50
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*.
51
+
1. Locate the *.zip* file that contains the template. User templates are located in the *\\ProjectTemplates* or *\\ItemTemplates* folder at *%USERPROFILE%\Documents\Visual Studio \<version\>\Templates*.
50
52
51
53
1. Extract the *.zip* file.
52
54
53
-
1. Modify or delete the current template files, or add new files to the template.
55
+
1. Modify the current template files, or delete or add new files to a project template.
54
56
55
57
1. Open, modify, and save the *.vstemplate* XML file to handle updated behavior or new files.
56
58
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).
59
+
For more information about the *.vstemplate* schema, see the [Visual Studio template schema reference](../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).
58
60
59
61
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
62
@@ -64,7 +66,7 @@ You can update an existing template without using the **Export Template Wizard**
64
66
65
67
## Related content
66
68
69
+
-[Project and item templates](creating-project-and-item-templates.md)
0 commit comments