31

How do you remove the following noise templates that don't even work?

enter image description here

Pang
  • 9,564
  • 146
  • 81
  • 122
dance2die
  • 35,807
  • 39
  • 131
  • 194

15 Answers15

33

In Visual Studio: go to Tools > Extensions and Updates and then uninstall or disable the template.

Pang
  • 9,564
  • 146
  • 81
  • 122
Hamid Behnam
  • 961
  • 1
  • 11
  • 16
32

To save a bit of time for 2010 users, the folder has moved:

...\My Documents\Visual Studio 2010\Templates\ProjectTemplates

Rich L
  • 321
  • 3
  • 2
  • 1
    I'm trying to remove custom templates from VS2010 and not finding the templates in any of these directories, including the one from @Rich L. How is VS2010 still listing these? – Jeff LaFay Sep 02 '10 at 13:32
  • 1
    I found mines @ `C:\Users\[user]\Documents\Visual Studio 2010\Templates\ItemTemplates`, deleted the _zip_ files and the templates were instantly removed from VS2010 (no restart needed). – Otiel Aug 12 '11 at 08:40
  • Thanks Rich L. I wasted half a day editing the ZIP file in the wrong folder because I was following the non-updated MS docs... – MetalMikester Sep 01 '11 at 17:29
  • 1
    for vs2015 : %USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\14.0\ProjectTemplatesCache – Harry Sarshogh Nov 09 '16 at 20:19
  • These may be copied to the visual studio ProjectTemplatesCache when detected, I would think. – jwize Apr 06 '22 at 21:17
  • So, it is finally worked after clearing 3 folders: ...Documents\Visual Studio 2019\Templates, ...Documents\Visual Studio 2019\My Exported Templates, ...{USER}\\AppData\Roaming\Microsoft\VisualStudio\{VS_NUMBER}\ProjectTemplatesCache – Dmitry Babich Oct 07 '22 at 05:06
19

For Visual Studio 2013, I found my template cache here:

%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\12.0\ProjectTemplatesCache
Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
Alex
  • 5,364
  • 9
  • 54
  • 69
  • 2
    for vs2015 : %USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\14.0\ProjectTemplatesCache – Harry Sarshogh Nov 09 '16 at 20:19
  • 1
    For VS2019, custom templates can be removed by deleting the template folder from %USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\{VSVersion}\ProjectTemplatesCache. Look for a {VSVersion} that begins with "16". – RNA_Polymerase Mar 16 '21 at 13:25
11

Deleting them off of disk should do the trick. Where they exist will depend a bit on where you installed them. If you installed them for all users they will be at

%ProgramFiles%\Microsoft Visual studio 9.0\Common7\Ide\ProjectTemplatesCache

For a single user they will be at

%USERPROFILE%\Visual Studio 2008\Templates\ProjectTemplates

EDIT

If InstallVSTemplates fails, it is likely one of the following. The one I can't help with is some program randomly dumping files inside of the ProjectTemplatesCache directory.

The other more likely cause is there is a bad template in the ProjectTemplates directory. InstallVSTemplates really just goes through this directory, and unzips all of the files into the ProjectTemplatesCache directory. You will have to search through this directory and find the .zip file which contains the junk files being added to your project Once you find the file, delete it, delete ProjectTemplatesCache, and then re-run InstallVSTemplates.

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
  • I do not see them on those two specified locations. Weird. – dance2die Apr 25 '09 at 15:26
  • Try searching for a ProjectTemplatesCache directory under VisualStudio. It should be there starting with VS2005 – JaredPar Apr 25 '09 at 15:28
  • "ProjectTemplatesCache" is there but when I deleted the folder, VS complains that there is no template for F# and only those noise templates show up... – dance2die Apr 25 '09 at 15:32
  • Let me try to reinstall F# again. – dance2die Apr 25 '09 at 15:33
  • @dance2die, hold on, don't re-install – JaredPar Apr 25 '09 at 15:39
  • 2
    @dance2die, I should have been clearer. I meant for you to delete those specific files from the ProjectTemplatesCache directory. It's not a big problem though. If you run the following command it will rebuild the directory devenv.exe /InstallVsTemplates – JaredPar Apr 25 '09 at 15:40
  • @Jared: Patience might have been a virtue but I have already reinstalled it...(and templates is back to normal) Let me see if those weird templates show up again later on. I will try to rebuild (which I didn't know of its existence) templates as you have suggested. Thank you. – dance2die Apr 25 '09 at 15:44
  • @Jared: It has happened again. It looks like after I run "Wise Registry Cleaner 4", those files show up as templates. I am trying to reinstall VS templates as you suggested. – dance2die Apr 25 '09 at 16:01
  • @Jared: Even reinstalling templates using "devenv.exe /InstallVsTemplates" did not fix the issue. It seems like whatever "Wise Registry Cleaner" did, it has messed up the template in a weird way. – dance2die Apr 25 '09 at 16:15
  • Fyi, I found my Item Templates here: C:\My Documents\Visual Studio 2008\My Exported Templates – Mike Gledhill Oct 28 '11 at 08:56
8

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
  • found what i was searching for here. didn't have to restart VS either. – joelnet Jan 18 '12 at 19:54
  • I had to run devenv /setup after all. after trying to re-add the template, it was giving an error. devenv /setup cleared all the cache out and seems to work fine now. – joelnet Jan 18 '12 at 20:19
6

For me the issue got resolved when I deleted the cache.bin file from ItemTemplatesCache folder. Full path of this folder is:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache

Also make sure you delete the template files from below locations:

  • C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates
  • C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache
  • C:\Users\Default\Documents\Visual Studio 2010\Templates\ItemTemplates
  • C:\Users[NT-USERNAME]\Documents\Visual Studio 2010\Templates\ItemTemplates
Nazir A
  • 71
  • 2
  • 4
6

For me it was a matter of removing it from here using VS2017: %USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\15.0_45552a03\ProjectTemplatesCache

Fratt
  • 239
  • 3
  • 13
  • The cache can also be refreshed as explained [here](https://developercommunity.visualstudio.com/content/problem/27424/cannot-remove-item-template.html): launch _Developer Command Prompt for VS 2017_ from Start Menu and run `devenv /updateconfiguration`. – Laurie Stearn Jan 01 '18 at 13:41
5
  • Delete the bad/unwanted project folders from

C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates

  • Clear cache

C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache

  • Delete stuff from (perhaps not necessary)

C:\Users[Your User Name]\Documents\Visual Studio 2008\Templates\ProjectTemplates

and finally open Visual Studio 2008 Command Prompt as Administrator and run

devenv /installvstemplates

Andrei Drynov
  • 8,362
  • 6
  • 39
  • 39
  • > Clear cache For Visual Studio 2013 Community, you have to delete `{program folder}\Common7\IDE\ItemTemplatesCache\cache.bin`. – tomByrer Apr 12 '15 at 04:01
5

Worke for VS 2012 and 2015 :
In Visual Studio: go to Tools > Extensions and Updates and then uninstall or disable the template.

worke in VS 2019 :
1- In VS2019, custom templates can be removed by deleting the template folder from %USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio{VSVersion}\ProjectTemplatesCache. Look for a {VSVersion} that begins with "16".

https://i.stack.imgur.com/V6SQ5.png

2- Delete What You Want From Templates Folder in {C:\Users\USERName\Documents\Visual Studio 2019\My Exported Templates}

Notes : {ProjectTemplatesCache} Or {ItemTemplatesCache}

https://i.stack.imgur.com/9BM9p.png

4

For Visual Studio 2019: Extensions > Manage extensions > Installed > Uninstall

Pang
  • 9,564
  • 146
  • 81
  • 122
Alex
  • 840
  • 7
  • 23
  • There is no extension that you can uninstall to remove `.NET Core` project templates. all my extensions are disabled and yet there are over 20 templates from Blazor, .NET Core, MVC, NUnit, WPF, Web Driver ... in Create New Project. The only 2 templates that I'm interested to keep are Empty Web and Console (C++) – AaA May 27 '20 at 02:26
  • This is accurate in 2022 as well – Joe Swindell Feb 03 '22 at 17:55
3

For Visual Studio Express 2010 you should delete all folders under

%USERPROFILE%\AppData\Local\Microsoft\VCSExpress\10.0\Extensions

2

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

tomByrer
  • 1,105
  • 12
  • 21
2

You could also try this:

dotnet new --uninstall <PATH|NUGET_ID>

It works for me in VS 2019 and VS 2022 to uninstall the Avalonia templates.

Description

The dotnet new --uninstall command uninstalls a template package at the PATH or NUGET_ID provided. When the <PATH|NUGET_ID> value isn't specified, all currently installed template packages and their associated templates are displayed. When specifying NUGET_ID, don't include the version number.

Examples

Uninstall the Avalonia templates

dotnet new --uninstall Avalonia.Templates

From MicrosoftDocs

Even Wonder
  • 1,127
  • 1
  • 14
  • 16
1

If the template was installed by double clicking a VSIX file, it is considered an extension and can be uninstalled using the technique described by Hamid Behnam above. Otherwise, it can be deleted from one of the template directories mentioned above.

SteveB
  • 233
  • 3
  • 12
1

It looks like in each case we use different recipe. Unfortunately, commands line and VS menu command listed in this thread did not work in my case, which is MS VS 2019 Community Edition on Win7 x64:

First, close VS, remove unwanted *.zip files from all following folders, as well as hidden cache.bin file from the last \ProjectTemplatesCache folder (it will be restored at VS startup), then restart VS. Here are those 3 folders:

{Documents}\Visual Studio 2019\My Exported Templates

{Documents}\Visual Studio 2019\Templates\ProjectTemplates

{User}\AppData\Roaming\Microsoft\VisualStudio{Number}\ProjectTemplatesCache