Skip to content

Commit 3bda150

Browse files
Merge pull request #13823 from v-thepet/vs2
Visual Studio freshness #2
2 parents dfcb53d + ce6c029 commit 3bda150

File tree

1 file changed

+28
-25
lines changed

1 file changed

+28
-25
lines changed

docs/ide/how-to-update-existing-templates.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Update existing project item templates
3-
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
55
ms.topic: how-to
66
helpviewer_keywords:
77
- item templates, updating
@@ -12,58 +12,61 @@ author: ghogen
1212
ms.author: ghogen
1313
manager: mijacobs
1414
ms.subservice: general-ide
15+
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.
1517
---
18+
1619
# Update existing templates
1720

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.
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.
1922

2023
## Use the Export Template Wizard
2124

22-
Visual Studio provides an **Export Template Wizard** that can be used to update an existing template:
25+
You can use the Visual Studio **Export Template Wizard** to update an existing template.
2326

2427
1. Choose **File** > **New** > **Project** from the menu bar.
2528

26-
1. Select the template that you want to update and continue through the steps to create the new project.
29+
1. Select the project template you want. If you want to update an existing project template, select that template.
30+
31+
1. Follow the steps to create the new project.
2732

28-
1. Modify the project in Visual Studio. For example, change the output type or add a new file to the project.
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.
2934

30-
1. On the **Project** menu, choose **Export Template**.
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.
3136

32-
The **Export Template Wizard** opens.
37+
1. On the **Project** menu, choose **Export Template**. The **Export Template Wizard** opens.
38+
39+
1. On the **Template Type** page, select either **Project Template** or **Item Template**, depending on which type you want to export.
3340

3441
1. Follow the prompts in the wizard to export the template as a *.zip* file.
3542

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**.
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.
3744

38-
1. Delete the old template *.zip* file.
45+
1. Delete the old template *.zip* file if necessary.
3946

4047
## Manually update an existing template
4148

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
49+
You can update an existing template without using the **Export Template Wizard** by manually modifying the files in the template *.zip* file.
4550

46-
1. Locate the *.zip* file that contains the template. User project templates are located at *%USERPROFILE%\Documents\Visual Studio \<version\>\Templates\ProjectTemplates*.
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*.
4752

4853
1. Extract the *.zip* file.
4954

50-
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.
5156

5257
1. Open, modify, and save the *.vstemplate* XML file to handle updated behavior or new files.
5358

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**.
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).
5760

58-
The files that you selected are compressed into a *.zip* file.
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**.
5962

60-
1. Put the new *.zip* file in the same directory as the old *.zip* file.
63+
1. Copy the resulting *.zip* file and paste it in the same directory as the old *.zip* file.
6164

62-
1. Delete the extracted template files and the old template *.zip* file.
65+
1. Delete the extracted template files, and delete the old template *.zip* file if necessary.
6366

6467
## Related content
6568

66-
- [Customize templates](../ide/customizing-project-and-item-templates.md)
67-
- [Create project and item templates](../ide/creating-project-and-item-templates.md)
69+
- [Project and item templates](creating-project-and-item-templates.md)
70+
- [Customize templates](customizing-project-and-item-templates.md)
71+
- [Template parameters](template-parameters.md)
6872
- [Visual Studio template schema reference](../extensibility/visual-studio-template-schema-reference.md)
69-
- [Template parameters](../ide/template-parameters.md)

0 commit comments

Comments
 (0)