Remove Custom Project Template that was Automatica

2019-03-14 12:48发布

问题:

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.

回答1:

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.



回答2:

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



回答3:

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


回答4:

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.



回答5:

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



回答6:

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.



回答7:

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.