删除自动导入的自定义项目模板

发布于 2024-09-17 21:35:52 字数 536 浏览 6 评论 0原文

我删除了放置在导出模板文件夹中的导出 zip 文件,当然它仍然显示在 Visual Studio 的“添加新项目”对话框中。我预料到了这一点,但我很难找到模板文件的其他存储位置。如何删除自定义模板?

编辑

我搜索了以下文件夹(以及许多其他文件夹,但这些是最明显的): %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache %userprofile%\Documents\Visual Studio 2010\我导出的模板 %userprofile%\Documents\Visual Studio 2010\Templates\ProjectTemplates

不确定这是否重要,但我的操作系统也使用 Windows 7。

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.

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

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

发布评论

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

评论(10

甜`诱少女 2024-09-24 21:35:52

尝试在 %userprofile%\Application Data\Microsoft\VisualStudio\10.0\ProjectTemplatesCache 下查找。这是通常存储模板的解压缩缓存的位置。如果不存在,请尝试在用户数据目录中的任意位置搜索名为 ProjectTemplatesCache 的文件夹。

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.

长伴 2024-09-24 21:35:52

模板也存储在“我的文档\Visual Studio 2010\Templates”中。在 ProjectTemplates 和 ItemTemplates 下等等,具体取决于语言。

编辑:我刚刚导出了一个项目模板。该 zip 文件是在 2 个位置创建的:

 My Documents\Visual Studio 2010\My Exported Templates\mytemplate.zip 
 My Documents\Visual Studio 2010\Templates\ProjectTemplates\mytemplate.zip

删除这两个位置也会从新项目对话框中删除该选择,因此我不确定您的计算机上发生了什么:(

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

难以启齿的温柔 2024-09-24 21:35:52

我的操作系统Windows 8.1,我使用Visual Studio 2013。

这是自定义模板的路径;

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

对于这种情况,我的自定义模板路径如下:

C:\Users\xxxxx\AppData\Roaming\Microsoft\VisualStudio\12.0\ProjectTemplatesCache

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
热鲨 2024-09-24 21:35:52

至少对于 VSIX 模板,官方方式使用VS2010很简单:

工具->扩展管理器...->已安装的扩展->模板->$yourTemplate->[Uninstall|Disable]

如果这首先适合您,那么您不必浪费时间具有不同的文件夹布局。

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.

本宫微胖 2024-09-24 21:35:52

如果有人需要 VS 2015 和 Windows 7 的答案(我知道),它是 %UserProfile% \Documents\Visual Studio 2015\Templates\ProjectTemplates

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

墨落成白 2024-09-24 21:35:52

为了完整起见,以下是您必须访问的所有路径,以清除 VS 2019 中的模板残留:

首先关闭 VS...

  1. C:\Users\USER\Documents\Visual Studio 2019\My Exported Templates
  2. <代码>C:\Users\USER\Documents\Visual Studio 2019\Templates\ProjectTemplates
  3. <代码>C:\Users\USER\AppData\Roaming\Microsoft\VisualStudio\16.0_xxxxxxxx
  4. <代码>C:\Users\USER\Application Data\Microsoft\VisualStudio\16.0_xxxxxxxx
  5. C:\Users\USER\AppData\Local\Microsoft\VisualStudio\16.0_xxxxxxxx\ProjectTemplatesCache_{GUID} >

对于项目模板(如果有)重复步骤 5。

注意:清除压缩模板、*.bin 文件和包含模板项的子文件夹。

For the sake of completeness here are all the paths you have to visit to clear template leftovers in VS 2019:

First close down VS...

  1. C:\Users\USER\Documents\Visual Studio 2019\My Exported Templates
  2. C:\Users\USER\Documents\Visual Studio 2019\Templates\ProjectTemplates
  3. C:\Users\USER\AppData\Roaming\Microsoft\VisualStudio\16.0_xxxxxxxx
  4. C:\Users\USER\Application Data\Microsoft\VisualStudio\16.0_xxxxxxxx
  5. C:\Users\USER\AppData\Local\Microsoft\VisualStudio\16.0_xxxxxxxx\ProjectTemplatesCache_{GUID}

Repeat step 5 for Item templates if any.

NOTE: Clear zipped templates, *.bin files and subfolders containing template items.

水溶 2024-09-24 21:35:52

手动搜索一些自定义配置文件模板(.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-09-24 21:35:52

如果您仍然看到“新建项目...”对话框中显示不需要的模板,则必须删除(对于 Visual Studio 2013 Community){程序文件夹}\Common7\IDE\ItemTemplatesCache\cache如上所述删除所有不需要的文件后。之后 VS 将重建模板列表。

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.

蓝眸 2024-09-24 21:35:52

我能够通过首先删除以下文件夹中的模板 zip 文件来解决 Visual Studio Community 2017 的此问题:

%UserProfile%\Documents\Visual Studio 2017\Templates\ProjectTemplates
%UserProfile%\Documents\Visual Studio 2017\My Exported Templates

然后删除以下文件夹:(

%UserProfile%\AppData\Roaming\Microsoft\VisualStudio\15.0_aed38a72\ProjectTemplatesCache

“15.0_”后的标识符可能会有所不同)

I was able to solve this problem for my Visual Studio Community 2017 by first deleting the template zip files in the following folders:

%UserProfile%\Documents\Visual Studio 2017\Templates\ProjectTemplates
%UserProfile%\Documents\Visual Studio 2017\My Exported Templates

Then deleting the following folder:

%UserProfile%\AppData\Roaming\Microsoft\VisualStudio\15.0_aed38a72\ProjectTemplatesCache

(The identifier after "15.0_" might vary)

路还长,别太狂 2024-09-24 21:35:52

就我而言,Windows 10 上的 Visual Studio 19 是这个文件夹:

%userprofile%\AppData\Roaming\Microsoft\VisualStudio[VS_VERSION]\ProjectTemplatesCache

我删除了模板文件夹,瞧!

In my case with Visual Studio 19 on Windows 10 it was this folder:

%userprofile%\AppData\Roaming\Microsoft\VisualStudio[VS_VERSION]\ProjectTemplatesCache

I deleted the template folder and voila!

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