Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update Visual Studio Template Cache

I've updated a default template in Visual Studio 2008 with the following path:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\CSharp\1033

But when I've tried adding a new file with this type of template, I'm still getting the old version which I have found to be cached in this folder path:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache\Web\CSharp\1033

What I would like to know is when does a new project template get pulled from it's zip file and put into the Item Tempate Cache in visual studio?

like image 320
Chris Avatar asked Nov 11 '09 19:11

Chris


People also ask

How do I update Visual Studio templates?

Visual Studio provides an Export Template Wizard that can be used to update an existing template: Choose File > New > Project from the menu bar. Select the template that you want to update and continue through the steps to create the new project.

How do I clear the cache in Visual Studio?

1. Close Visual Studio (ensure devenv.exe is not present in the Task Manager) 2. Delete the %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache directory 3. Restart Visual Studio.

Where are Visual Studio templates stored?

By default, user templates are located in: %USERPROFILE%\Documents\Visual Studio 2019\Templates\ProjectTemplates. %USERPROFILE%\Documents\Visual Studio 2019\Templates\ItemTemplates.


2 Answers

Open up the Visual Studio Command Prompt and type in:

devenv /installvstemplates

Source: How to Edit Visual Studio Templates

like image 57
Jorge Israel Peña Avatar answered Sep 28 '22 08:09

Jorge Israel Peña


I had the same issue. What was here did not work for me. What I did however is to go to a specific folder and edit the files directly. Just go there :

%AppData%\Microsoft\VisualStudio\{some_version}\ItemTemplatesCache\

It contains folders named after the zip files from your archives in the template folder. I needed admin priviledge for edits.

Enjoy.

like image 23
UchiTesting Avatar answered Sep 28 '22 07:09

UchiTesting