Jeff LaFay
Jeff LaFay

Reputation: 13350

Remove Custom Project Template that was Automatically Imported

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.

Upvotes: 23

Views: 19781

Answers (10)

metablaster
metablaster

Reputation: 2184

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.

Upvotes: 2

Bjørnar Hvidsten
Bjørnar Hvidsten

Reputation: 969

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!

Upvotes: 0

morezoom
morezoom

Reputation: 101

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)

Upvotes: 0

Marc Ziss
Marc Ziss

Reputation: 709

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

Upvotes: 2

tomByrer
tomByrer

Reputation: 1155

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.

Upvotes: 0

cihancoskun
cihancoskun

Reputation: 591

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

Upvotes: 16

mbx
mbx

Reputation: 6526

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.

Upvotes: 6

Nicole Calinoiu
Nicole Calinoiu

Reputation: 20982

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.

Upvotes: 40

AfterStar
AfterStar

Reputation: 91

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.

Upvotes: 1

stombeur
stombeur

Reputation: 2714

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

Upvotes: 21

Related Questions