views:

201

answers:

4

Hi

I am using Visual Studios 2008 Express so I am wondering if there is a 3rd party standalone app that I can use to make my C# snippets fast and easy(gui interface) and then somehow upload it into my VS2008.

I am not sure what snippets are held in but I want to keep backups of them. I am not sure if Visual Studios has an import snippets/export snippets to do this.

A: 

Actually, I remember doing something similar. I will write code that I wanted to use as a snippet and then I will just select it and drag it to the General Toolbox. That will create a control like object in the Toolbox that you can just drag and drop in your code when you need it. It is not a real snippet but it works.

Another option is to create a class library with all your code snippets and then add a reference to it in your projects.

Ricardo
That only stores the text in the current solution.
AMissico
Creating a class library is not the same as a snippet of generic code that must be modified to fit the implementation.
AMissico
+1  A: 

There is a Snippet Designer on CodePlex. I'm not sure if its compatible with VS Express, though. Charlie Calvert has a quick and dirty write up on the Snippet Designer as well.

With regards to snippet import/export, Sara Ford has a blog post that quickly walks you through how to export/import your snippets as a .vssettings file.

Jeff Atwood has an old, but still relevant blog post about Snippets.

Finally, code snippets you create are typically stored here:

%USERPROFILE%\Documents\Visual Studio 2008\Code Snippets\Visual C#\My Code Snippets

And the built in snippets for VS2008 are stored here (for C#): %USERPROFILE%\Documents\Visual Studio 2008\Code Snippets\Visual C#\My Code Snippets

Metro Smurf
+1  A: 

For a stand alone version you can use SnippetEditor

Courtney de Lautour
I will check it out. Do you know if VS has a import/export feature for code snippets?
chobo2
I just save them into the directory Metro Smurf has mentioned and hit Sync in SE. To back them up I would just copy them from there.
Courtney de Lautour
A: 

See http://stackoverflow.com/questions/33994/what-code-snippet-editor-do-you-use.

Code Snippet Editor is the best that I been able to find. Snippy is buggy and not workable, fragile. Snippet Designer in an add-in and I am not sure it the express editions support add-ins. (Maybe someone has the answer to that.)

AMissico