Share via


Removing all traces of Code Snippets

One of the best tools for increasing productiivty in Visual Studio 2005 is Code Snippets.  As someone who demonstrates our tools to folks on a daily basis, snippets save me a ton of time.  Furthermore, snippets are a great learning tool as they provide you the code for how to perform some common but not always so obvious tasks.

In the quest to create some of my own snippets, I discovered that Visual Studio 2005 does something to cache parts of the snippet away - even if you delete the actual snippet file itself.  I found that I was still able to right-click, Insert Snippet and I'd see the title of my snippet but no body.  Quite annoying.

I did some asking around and found that if you delete C:\Documents and Settings\<username>\Local Settings\Application Data\Microsoft\VisualStudio\8.0\1033\ExpansionsXML.xml, you'll put yourself back to a pristine snippet environment.

So if you find yourself experimenting with snippets and want to get yourself back to ground zero, whack the above file and party on.