Hi,
how can i export code snippets from VS 2008 that i created to a different computer.
-Thanks

Save the .cs file, or copy the code to your clipboard from visual studio then open notepad and paste the contents, then save the file.

Just treat it like any other text file.

Hi ,
if i create snippets , in which path/file are they stored because i could not find them in the C:\Program Files\Microsoft Visual Studio 9.0
folder. (I made search for .snippet file , but i could not find mine)


Note:
I also noticed there is a Code snippet manager , but I don't know how to export a snippet , to import it on another computer

Tools -- Import and Export Settings -- Export Selected Settings ---Deslect everything.

Then select: General Settings --- Code Snippet Locations

Run the export then look at the resulting file and see where your IDE is configured to save code snippets. Look in each of those stores and you will find your custom code snippet.

Thanks for that , I did
It took me while to reply because , I was testing this.

I took the steps that you wrote , and then (on my other computer) I imported the settings created(the settings file was about 2KB because i used a few code snippets to test.

Nothing happened after i imported the vssettings file.
I opened the exported file and searched for text relevant to the snippets i created and found nothing.

I tried again , but instead of checking the "Code Snippets" checkbox , i checked the "Toolbox" checkbox , and it worked.
I did not create a snippets folder , i realised.

-Thanks
:icon_mrgreen:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.