How to: Locate and organize project and item templates
Applies to: Visual Studio
Visual Studio for Mac
Visual Studio Code
Template files must be placed in a known location in order for them to be shown in the new project and new item dialog boxes..
Locate templates
Installed templates and user templates are stored in two different locations.
Installed templates
By default, templates installed with Visual Studio are located in:
%ProgramFiles(x86)%\Microsoft Visual Studio\2019\<edition>\Common7\IDE\ProjectTemplates\<Language>\<Locale ID>
%ProgramFiles(x86)%\Microsoft Visual Studio\2019\<edition>\Common7\IDE\ItemTemplates\<Language>\<Locale ID>
For example, the following directory has the Visual Basic item templates for English (LCID 1033):
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ItemTemplates\VisualBasic\1033
%ProgramFiles%\Microsoft Visual Studio\2022\<edition>\Common7\IDE\ProjectTemplates\<Language>\<Locale ID>
%ProgramFiles%\Microsoft Visual Studio\2022\<edition>\Common7\IDE\ItemTemplates\<Language>\<Locale ID>
For example, the following directory has the Visual Basic item templates for English (LCID 1033):
C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\ItemTemplates\VisualBasic\1033
User templates
If you add a compressed (.zip) file that includes a .vstemplate file to the user template directory, the template appears in the new project and new item dialog boxes. By default, user templates are located in:
%USERPROFILE%\Documents\Visual Studio 2019\Templates\ProjectTemplates
%USERPROFILE%\Documents\Visual Studio 2019\Templates\ItemTemplates
For example, the following directory has user project templates for C#:
- C:\Users\UserName\Documents\Visual Studio 2019\Templates\ProjectTemplates\Visual C#
%USERPROFILE%\Documents\Visual Studio 2022\Templates\ProjectTemplates
%USERPROFILE%\Documents\Visual Studio 2022\Templates\ItemTemplates
For example, the following directory has user project templates for C#:
- C:\Users\UserName\Documents\Visual Studio 2022\Templates\ProjectTemplates\Visual C#
Tip
You can change the known location for user templates in Tools > Options > Projects and Solutions > Locations.
See also
Feedback
Submit and view feedback for