23

I deleted the exported zip file that was placed in my exported templates folder and of course it still shows in Visual Studio's "Add New Project" dialog. I expected that but I'm having a difficult time finding where else the template files are stored. How do I remove a custom template?

Edit

I've searched the following folders (and numerous others, but these are the most obvious): %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache %userprofile%\Documents\Visual Studio 2010\My Exported Templates %userprofile%\Documents\Visual Studio 2010\Templates\ProjectTemplates

Not sure if it matters, but I'm also using Windows 7 for my OS.

Jeff LaFay
  • 12,882
  • 13
  • 71
  • 101

10 Answers10

40

Try looking under %userprofile%\Application Data\Microsoft\VisualStudio\10.0\ProjectTemplatesCache. This is where the unzipped cache of the template would usually be stored. If it isn't there, try searching for a folder named ProjectTemplatesCache anywhere in your user data directory.

Nicole Calinoiu
  • 20,843
  • 2
  • 44
  • 49
  • Awesome, that did it! I couldn't initially see the Application Data folder because access was denied (probably a security policy enforced by our admins) but of course Microsoft and it's subfolders were accessible. Deleted the cached templates and life is prettier now. Thanks! – Jeff LaFay Sep 20 '10 at 12:37
  • 5
    For VS2013 on Win7: `%userprofile%\Application Data\Microsoft\VisualStudio\12.0\ProjectTemplatesCache` – Drew Noakes Apr 06 '15 at 17:01
  • 2
    For VS2017 users is correct path: %APPDATA%\Microsoft\VisualStudio\\ProjectTemplatesCache – Petr Havlát Dec 22 '18 at 09:56
  • 4
    For VS 2019 it was this folder (installation specific) `C:\Users\User\AppData\Roaming\Microsoft\VisualStudio\16.0_9daf0883\ProjectTemplatesCache` – metablaster Oct 09 '19 at 01:47
  • For VS Enterprise version 15.9.16 and Windows 10 Enterprise `C:\Users\\AppData\Roaming\Microsoft\VisualStudio\15.0_ef05b42e\ProjectTemplatesCache` – André Andrade Mar 10 '20 at 10:53
21

Templates are also stored in "My Documents\Visual Studio 2010\Templates". Under ProjectTemplates and ItemTemplates and so on depending on the language.

EDIT: i just exported a project template. The zip file was created in 2 locations:

 My Documents\Visual Studio 2010\My Exported Templates\mytemplate.zip 
 My Documents\Visual Studio 2010\Templates\ProjectTemplates\mytemplate.zip

deleting both of these also removed the choice from the new project dialog, so I'm not sure what's happening on your machine :(

stombeur
  • 2,704
  • 22
  • 45
  • Thanks for the pointer Stephanie, I tried that folder as well and no luck. Out of curiosity, I tried rebooting in case something was stored in-memory and when creating new projects I still see the choices. Even though I deleted the zip files in my project template folder, I can STILL create new projects with those defunct templates that I want removed. Visual Studio can be sneaky at times :) – Jeff LaFay Sep 02 '10 at 14:07
  • Thanks for the help anyhow. MS likes hiding things to make life more interesting I suppose. – Jeff LaFay Sep 02 '10 at 15:42
  • This is also where 2012's 'Wizards' are stored. – Qix - MONICA WAS MISTREATED Oct 13 '12 at 20:10
  • 1
    Yes, removing from these two locations does the job. Visual Studio then clears it from the `ProjectTemplatesCache` folder. – Sabuncu Apr 05 '15 at 09:23
16

My OS Windows 8.1 and I use Visual Studio 2013.

Here is the path of Custom Templates;

%userprofile%\AppData\Roaming\Microsoft\VisualStudio\12.0\ProjectTemplatesCache

For this case, my path of custom templates like;

C:\Users\xxxxx\AppData\Roaming\Microsoft\VisualStudio\12.0\ProjectTemplatesCache
cihancoskun
  • 591
  • 5
  • 7
  • 1
    Confirmed, worked for Visual Studio 2017 Community (I also deleted cach.bin from that dir too). My location was: _%userprofile%\AppData\Roaming\Microsoft\VisualStudio\15.0_e6‌​6e6af9\ProjectTempla‌​tesCache_ – Matt M. Mar 17 '17 at 17:33
6

At least for VSIX templates, the official way using VS2010 simply works:

Tools->Extension Manager...->Installed Extensions->Templates->$yourTemplate->[Uninstall|Disable]

If that works for you in the first place, you don't have to mess around with different folder layouts.

mbx
  • 6,292
  • 6
  • 58
  • 91
2

if anyone need the answer for VS 2015 and Windows 7(I know) it's %UserProfile% \Documents\Visual Studio 2015\Templates\ProjectTemplates

Marc Ziss
  • 659
  • 6
  • 10
1

For the sake of completeness here are all the paths you have to visit to clear template leftovers in VS 2019:

First close down VS...

  1. C:\Users\USER\Documents\Visual Studio 2019\My Exported Templates
  2. C:\Users\USER\Documents\Visual Studio 2019\Templates\ProjectTemplates
  3. C:\Users\USER\AppData\Roaming\Microsoft\VisualStudio\16.0_xxxxxxxx
  4. C:\Users\USER\Application Data\Microsoft\VisualStudio\16.0_xxxxxxxx
  5. C:\Users\USER\AppData\Local\Microsoft\VisualStudio\16.0_xxxxxxxx\ProjectTemplatesCache_{GUID}

Repeat step 5 for Item templates if any.

NOTE: Clear zipped templates, *.bin files and subfolders containing template items.

metablaster
  • 1,958
  • 12
  • 26
  • I guess there's something else that needs to be done: after deleting everything in those folders, my custom project template keeps showing up in VS2019 (v. 16.11.4) – Sue Maurizio Jan 19 '22 at 11:23
1

After manually searching for some of the custom profile templates(.vstemplate),I found them at the following location:

%userprofile%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions

It appears VS2010 installs some of the templates as extesions or the authors made it that way.I hope this helps someone.

May need to run "devenv /setup" at the run command to refresh the VS2010 after you delete the templates.

AfterStar
  • 91
  • 1
  • 4
0

If you still see the unwanted templates displayed in the New Project... dialog, you have to delete (for Visual Studio 2013 Community) {program folder}\Common7\IDE\ItemTemplatesCache\cache.bin after deleting all the unwanted files as described above. Afterwards VS will rebuild the templates listing.

tomByrer
  • 1,105
  • 12
  • 21
0

I was able to solve this problem for my Visual Studio Community 2017 by first deleting the template zip files in the following folders:

%UserProfile%\Documents\Visual Studio 2017\Templates\ProjectTemplates
%UserProfile%\Documents\Visual Studio 2017\My Exported Templates

Then deleting the following folder:

%UserProfile%\AppData\Roaming\Microsoft\VisualStudio\15.0_aed38a72\ProjectTemplatesCache

(The identifier after "15.0_" might vary)

morezoom
  • 101
  • 3
  • 7
0

In my case with Visual Studio 19 on Windows 10 it was this folder:

%userprofile%\AppData\Roaming\Microsoft\VisualStudio[VS_VERSION]\ProjectTemplatesCache

I deleted the template folder and voila!

Bjørnar Hvidsten
  • 859
  • 12
  • 15