views:

27

answers:

2

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.

A: 

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 :(

StephaneT
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 :)
jlafay
Thanks for the help anyhow. MS likes hiding things to make life more interesting I suppose.
jlafay
+1  A: 

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
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!
jlafay