How do I delete an Imported Snippet in Visual Studio?

依然范特西╮ 提交于 2019-12-23 07:00:09

问题


I imported a snippet, and I want it gone. Problem is that the Snippet Manager has the Remove button grayed out when I go in and try to remove it, any ideas?


回答1:


Chances are that code snippet was imported to Program Files folder (e.g. C:\Program Files (x86)\Microsoft Visual Studio 11.0\Web\Snippets\CSS\1033\CSS) instead of C:\Users\\Documents\Visual Studio 2012\Code Snippets

Snippet Manager displays the location of selected snippet, just go there, delete it manually and restart Visual Studio.




回答2:


Yes, this is because you can only remove directories and not individual snippets (at least from the Code Snippets Manager, you know, Microsoft style!):

To remove a directory from the Code Snippet Manager, select the directory that you want to remove.

Reference: https://msdn.microsoft.com/en-us/library/9ybhaktf(v=vs.100).aspx



来源:https://stackoverflow.com/questions/13369579/how-do-i-delete-an-imported-snippet-in-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!