Groups | Blog | Home
all groups > visual studio .net general > july 2007 >

visual studio .net general : VS Snippet won't die



Larry
7/31/2007 3:03:41 PM
Hi Folks:

I have a snippet that refuses to die.

It was a great relationship at first, me and my snippet. It was my
first, really, and you know the fond memories you have of your first.

But then a newer, prettier snippet came along and it was time to kill
my first snippet. But it refused to die.

Even though I deleted it from the snippet manager, and physically
removed it from my personal snippet directory and made sure it was not
alive in the vs snippet directory, it still shows up in the
intellisense list. My guess is its lurking around the registry,
jealous and scheming.

Any ideas how to get rid of unwanted, old, lingering, and bitter
snippets?
Stevanich
8/31/2007 12:34:44 PM
Larry,

That's funny.

" Each individual snippet is contained wholly within its own <Snippet>
element. To remove snippets you don't want, first check the <References> and
<Imports> nodes. If any are only used by the snippet you are deleting, then
you can delete the corresponding <Reference> and <Import> nodes as well;
however, bear in mind from the example in Tip 2 that although there were
three functions in one snippet file, all of which required the same assembly
and namespace, the snippet file included it only once. So, be sure that the
<Reference> or <Imports> elements you delete aren't required by any other
code snippets in the file.

After removing those, simply delete all the XML from the opening <Snippet>
to the closing </Snippet> tags for each item you want to remove. Save the
file. You can test your changes both by using the Test feature in the
Snippet Editor, or by simply inserting them into a Visual Studio project and
taking advantage of the real-time debugging features."
from http://www.devx.com/dotnet/Article/28997/0/page/4

Hope this helps,


Steve

[quoted text, click to view]

AddThis Social Bookmark Button