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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3627354/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 12:24:52  来源:igfitidea点击:

Remove Custom Project Template that was Automatically Imported

visual-studiovisual-studio-2010project-template

提问by Jeff LaFay

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?

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

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

我搜索了以下文件夹(以及许多其他文件夹,但这些是最明显的): %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.

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

回答by Nicole Calinoiu

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.

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

回答by stombeur

Templates are also stored in "My Documents\Visual Studio 2010\Templates". Under ProjectTemplates and ItemTemplates and so on depending on the language.

模板也存储在“My Documents\Visual Studio 2010\Templates”中。根据语言在 ProjectTemplates 和 ItemTemplates 下等等。

EDIT: i just exported a project template. The zip file was created in 2 locations:

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

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

删除这两个也删除了新项目对话框中的选择,所以我不确定你的机器上发生了什么:(

回答by cihancoskun

My OS Windows 8.1and I use Visual Studio 2013.

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

Here is the path of Custom Templates;

这是自定义模板的路径;

%userprofile%\AppData\Roaming\Microsoft\VisualStudio.0\ProjectTemplatesCache

For this case, my path of custom templates like;

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

C:\Users\xxxxx\AppData\Roaming\Microsoft\VisualStudio.0\ProjectTemplatesCache

回答by mbx

At least for VSIX templates, the official way using VS2010simply works:

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

Tools->Extension Manager...->Installed Extensions->Templates->$yourTemplate->[Uninstall|Disable]

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.

如果这首先对您有用,您就不必弄乱不同的文件夹布局。

回答by Marc Ziss

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

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

回答by AfterStar

After manually searching for some of the custom profile templates(.vstemplate),I found them at the following location:

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

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

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

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

May need to run "devenv /setup" at the run command to refresh the VS2010 after you delete the templates.

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

回答by morezoom

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

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

%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.0_aed38a72\ProjectTemplatesCache

(The identifier after "15.0_" might vary)

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

回答by tomByrer

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.binafter deleting all the unwanted files as described above. Afterwards VS will rebuild the templates listing.

如果您仍然看到New Project...对话框中显示不需要的模板,则必须在{program folder}\Common7\IDE\ItemTemplatesCache\cache.bin如上所述删除所有不需要的文件后删除(对于 Visual Studio 2013 社区)。之后 VS 将重建模板列表。