How do I delete an Imported Snippet in Visual Studio?
Asked Answered
F

3

16

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?

Fallen answered 13/11, 2012 at 21:59 Comment(0)
D
13

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.

Dogbane answered 20/11, 2012 at 16:2 Comment(1)
Why do they still have a remove button?! My snippets located in my user location C:\Users\<MYUSER>\Documents\Visual Studio 2013\Code Snippets\Visual C#\My Code SnippetsGoogolplex
C
3

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

Celiaceliac answered 7/4, 2017 at 14:45 Comment(1)
It is not a bug, it's a feature! XDCeliaceliac
W
0

For Ubuntu users, please remove snippet files in ~/.config/Code/User/snippets
Not sure if applicable for other Linux distributions.

Wallenstein answered 22/10, 2020 at 13:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.