Reputation: 36965
How do you remove the following noise templates that don't even work?
Upvotes: 31
Views: 50937
Reputation: 184
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
Upvotes: 1
Reputation: 1386
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.
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.
Uninstall the Avalonia templates
dotnet new --uninstall Avalonia.Templates
From MicrosoftDocs
Upvotes: 4
Reputation: 59
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.sstatic.net/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.sstatic.net/9BM9p.png
Upvotes: 5
Reputation: 876
For Visual Studio 2019: Extensions > Manage extensions > Installed > Uninstall
Upvotes: 4
Reputation: 1010
In Visual Studio: go to Tools > Extensions and Updates and then uninstall or disable the template.
Upvotes: 34
Reputation: 111
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:
Upvotes: 6
Reputation: 239
For me it was a matter of removing it from here using VS2017: %USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\15.0_45552a03\ProjectTemplatesCache
Upvotes: 6
Reputation: 1155
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.
Upvotes: 2
Reputation: 5656
For Visual Studio 2013, I found my template cache here:
%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\12.0\ProjectTemplatesCache
Upvotes: 20
Reputation: 273
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.
Upvotes: 1
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: 8
Reputation: 31
For Visual Studio Express 2010 you should delete all folders under
%USERPROFILE%\AppData\Local\Microsoft\VCSExpress\10.0\Extensions
Upvotes: 3
Reputation: 321
To save a bit of time for 2010 users, the folder has moved:
...\My Documents\Visual Studio 2010\Templates\ProjectTemplates
Upvotes: 32
Reputation: 8592
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache
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
Upvotes: 6
Reputation: 755387
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.
Upvotes: 11