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.
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".
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.
对于 Visual Studio 2013 Community,您必须在删除上述所有不需要的文件后删除 {程序文件夹}\Common7\IDE\ItemTemplatesCache\cache.bin。 之后 VS 将重建在 New Project... 对话框中列出的模板。
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.
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.
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
发布评论
评论(15)
在 Visual Studio 中:转到工具 > 扩展和更新,然后卸载或禁用该模板。
In Visual Studio: go to Tools > Extensions and Updates and then uninstall or disable the template.
为了为 2010 用户节省一些时间,该文件夹已移动:
...\My Documents\Visual Studio 2010\Templates\ProjectTemplates
To save a bit of time for 2010 users, the folder has moved:
...\My Documents\Visual Studio 2010\Templates\ProjectTemplates
对于 Visual Studio 2013,我在这里找到了我的模板缓存:
For Visual Studio 2013, I found my template cache here:
从磁盘上删除它们应该可以解决问题。 它们存在的位置在一定程度上取决于您安装它们的位置。 如果您为所有用户安装了它们,他们将位于
对于单个用户,他们将位于
编辑
如果 InstallVSTemplates 失败,则可能是以下原因之一。 我无能为力的是某个程序随机将文件转储到 ProjectTemplatesCache 目录中。
另一个更可能的原因是 ProjectTemplates 目录中存在错误的模板。 InstallVSTemplates 实际上只是遍历此目录,并将所有文件解压缩到 ProjectTemplatesCache 目录中。 您必须搜索此目录并找到包含添加到项目中的垃圾文件的 .zip 文件。找到该文件后,将其删除,删除 ProjectTemplatesCache,然后重新运行 InstallVSTemplates。
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
For a single user they will be at
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.
在手动搜索一些自定义配置文件模板(.vstemplate)后,我在以下位置找到了它们:
VS2010似乎将一些模板安装为扩展或作者这样做了。我希望这对某人有帮助。
删除模板后,可能需要在运行命令中运行“devenv /setup”来刷新 VS2010。
After manually searching for some of the custom profile templates(.vstemplate),I found them at the following location:
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.
从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[您的用户名]\Documents\Visual Studio 2008\Templates\ProjectTemplates
,最后以管理员身份打开 Visual Studio 2008 命令提示符并运行
devenv /installvstemplates
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
对我来说,问题是使用 VS2017 从这里删除它:
%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\15.0_45552a03\ProjectTemplatesCache
For me it was a matter of removing it from here using VS2017:
%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\15.0_45552a03\ProjectTemplatesCache
对我来说,当我从 ItemTemplatesCache 文件夹中删除 cache.bin 文件时,问题得到了解决。 此文件夹的完整路径为:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache
另外,请确保从以下位置删除模板文件:
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:
VS 2012 和 2015 的工作:
在 Visual Studio 中:转到“工具”>“ 扩展和更新,然后卸载或禁用该模板。
VS 2019 中的工作:
1- 在 VS2019 中,可以通过从 %USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio{VSVersion}\ProjectTemplatesCache 中删除模板文件夹来删除自定义模板。 查找以“16”开头的 {VSVersion}。
https://i.sstatic.net/V6SQ5.png
2- 从模板中删除您想要的内容{C:\Users\USERName\Documents\Visual Studio 2019\My Exported Templates} 中的文件夹
注意:
{ProjectTemplatesCache} 或 {ItemTemplatesCache}
https://i.sstatic.net/9BM9p.png
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
对于 Visual Studio 2019:
扩展>> 管理扩展> 已安装> 卸载
For Visual Studio 2019:
Extensions > Manage extensions > Installed > Uninstall
对于 Visual Studio Express 2010,您应该删除
%USERPROFILE%\AppData\Local\Microsoft\VCSExpress\10.0\Extensions下的所有文件夹
For Visual Studio Express 2010 you should delete all folders under
%USERPROFILE%\AppData\Local\Microsoft\VCSExpress\10.0\Extensions
您也可以尝试以下操作:
它适用于我在 VS 2019 和 VS 2022 中卸载 Avalonia 模板。
说明
dotnet new --uninstall
命令卸载提供的PATH
或NUGET_ID
处的模板包。 当未指定
值时,将显示所有当前安装的模板包及其关联的模板。 指定NUGET_ID
时,请勿包含版本号。示例
Avalonia 模板
从 >微软文档
You could also try this:
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 thePATH
orNUGET_ID
provided. When the<PATH|NUGET_ID>
value isn't specified, all currently installed template packages and their associated templates are displayed. When specifyingNUGET_ID
, don't include the version number.Examples
Uninstall the Avalonia templates
From MicrosoftDocs
对于 Visual Studio 2013 Community,您必须在删除上述所有不需要的文件后删除
{程序文件夹}\Common7\IDE\ItemTemplatesCache\cache.bin
。 之后 VS 将重建在New Project...
对话框中列出的模板。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 theNew Project...
dialog.如果模板是通过双击 VSIX 文件安装的,则它被视为扩展,可以使用上面 Hamid Behnam 描述的技术进行卸载。 否则,可以从上述模板目录之一中将其删除。
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.
看起来我们在每种情况下都使用不同的配方。 不幸的是,此线程中列出的命令行和 VS 菜单命令在我的情况下不起作用,即 Win7 x64 上的 MS VS 2019 Community Edition:
首先,关闭 VS,从所有文件中删除不需要的 *.zip 文件以下文件夹,以及最后一个
\ProjectTemplatesCache
文件夹中隐藏的cache.bin
文件(它将在 VS 启动时恢复),然后重新启动 VS。 以下是这 3 个文件夹:{Documents}\Visual Studio 2019\My Exported Templates
{Documents}\Visual Studio 2019\Templates\ProjectTemplates
{User}\AppData \Roaming\Microsoft\VisualStudio{Number}\ProjectTemplatesCache
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