3

I could have asked this question years ago, but I think it has finally annoyed me enough to ask this question. Many times while I am coding, Visual Studio tries to Intellisense my deal with testc. I know that testc is a snippet for a test class, but it is something I will never use in anything except maybe a test project, and likely not even then. So, how do I prevent this annoyance from ever appearing in my Intellisense options again? Yeah I know... stupid thing to worry about...

Serj Sagan
  • 28,927
  • 17
  • 154
  • 183
  • Possible duplicate of [How do I delete an Imported Snippet in Visual Studio?](http://stackoverflow.com/questions/13369579/how-do-i-delete-an-imported-snippet-in-visual-studio) – John Smith Oct 07 '15 at 02:10

2 Answers2

4
  1. On the Tools menu, click Code Snippets Manager.
  2. Select the directory Test.
  3. Click Remove.
Mohit S
  • 13,723
  • 6
  • 34
  • 69
  • @GrantWinney: Even that was my first thought while working with the snippet manager. we shall raise the issue to Visual Studio Development team. :D – Mohit S Oct 07 '15 at 02:06
2

Press CTRL + K, CTRL + B. This will bring up the code snippets manager. In the Visual C# directory, you can remove the snippets (testc in your case) that you don't want to include. Note that system generated snippets cannot be removed by this method, although per mojits answer you could remove the entire directory of snippets.

One way around this is to delete the snippet file manually, by finding / deleting its actual file. I am using Visual C# express 2010 right now, and this is the directory they are in for me (you may have to modify slightly, and restart VS for changes to take effect).

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Visual C#

John Smith
  • 7,243
  • 6
  • 49
  • 61
  • Up vote for the keyboard shortcut, but Mohit's answer is more correct. – Serj Sagan Oct 07 '15 at 02:05
  • @SerjSagan yes, but his solution will remove the entire directory. – John Smith Oct 07 '15 at 02:06
  • @GrantWinney yeah, and it's won't let you remove a system generated snippet from the snippet manager (although you could remove the entire directory there...). if you wanted to just remove a single one, your best bet would be to navigate to the folder and delete the file manually – John Smith Oct 07 '15 at 02:12