如何删除不良的 Visual Studio 模板?

发布于 2024-07-17 18:49:20 字数 165 浏览 9 评论 0 原文

如何删除以下甚至不起作用的噪音模板?

输入图片此处描述

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

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(15

相对绾红妆 2024-07-24 18:49:20

在 Visual Studio 中:转到工具 > 扩展和更新,然后卸载或禁用该模板。

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

柠北森屋 2024-07-24 18:49:20

为了为 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

握住你手 2024-07-24 18:49:20

对于 Visual Studio 2013,我在这里找到了我的模板缓存:

%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\12.0\ProjectTemplatesCache

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

%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\12.0\ProjectTemplatesCache
北笙凉宸 2024-07-24 18:49:20

从磁盘上删除它们应该可以解决问题。 它们存在的位置在一定程度上取决于您安装它们的位置。 如果您为所有用户安装了它们,他们将位于

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

对于单个用户,他们将位于

%USERPROFILE%\Visual Studio 2008\Templates\ProjectTemplates

编辑

如果 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

%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.

思念满溢 2024-07-24 18:49:20

在手动搜索一些自定义配置文件模板(.vstemplate)后,我在以下位置找到了它们:

%userprofile%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions

VS2010似乎将一些模板安装为扩展或作者这样做了。我希望这对某人有帮助。

删除模板后,可能需要在运行命令中运行“devenv /setup”来刷新 VS2010。

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.

姐不稀罕 2024-07-24 18:49:20
  • 删除错误/不需要的项目文件夹

从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

  • 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

蝶舞 2024-07-24 18:49:20

对我来说,问题是使用 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

小霸王臭丫头 2024-07-24 18:49:20

对我来说,当我从 ItemTemplatesCache 文件夹中删除 cache.bin 文件时,问题得到了解决。 此文件夹的完整路径为:

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

另外,请确保从以下位置删除模板文件:

  • 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-用户名]\Documents\Visual Studio 2010\Templates\ItemTemplates

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
池木 2024-07-24 18:49:20

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

友欢 2024-07-24 18:49:20

对于 Visual Studio 2019:
扩展>> 管理扩展> 已安装> 卸载

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

一念一轮回 2024-07-24 18:49:20

对于 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

稳稳的幸福 2024-07-24 18:49:20

您也可以尝试以下操作:

dotnet new --uninstall <PATH|NUGET_ID>

它适用于我在 VS 2019VS 2022 中卸载 Avalonia 模板。

说明

dotnet new --uninstall 命令卸载提供的 PATHNUGET_ID 处的模板包。 当未指定 值时,将显示所有当前安装的模板包及其关联的模板。 指定 NUGET_ID 时,请勿包含版本号。

示例

Avalonia 模板

dotnet new --uninstall Avalonia.Templates

>微软文档

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

最偏执的依靠 2024-07-24 18:49:20

对于 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.

锦欢 2024-07-24 18:49:20

如果模板是通过双击 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.

宣告ˉ结束 2024-07-24 18:49:20

看起来我们在每种情况下都使用不同的配方。 不幸的是,此线程中列出的命令行和 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文