943,809 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Marked Solved
  • Views: 497
  • C# RSS
Sep 11th, 2009
0

Export code snippets from VS 2008

Expand Post »
Hi,
how can i export code snippets from VS 2008 that i created to a different computer.
-Thanks
Similar Threads
Reputation Points: 8
Solved Threads: 2
Junior Poster in Training
stoymigo is offline Offline
52 posts
since Aug 2008
Sep 11th, 2009
0

Re: Export code snippets from VS 2008

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.
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Sep 11th, 2009
0

Re: Export code snippets from VS 2008

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
Last edited by stoymigo; Sep 11th, 2009 at 7:19 am.
Reputation Points: 8
Solved Threads: 2
Junior Poster in Training
stoymigo is offline Offline
52 posts
since Aug 2008
Sep 11th, 2009
0

Re: Export code snippets from VS 2008

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.
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Sep 11th, 2009
0

Re: Export code snippets from VS 2008

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
Reputation Points: 8
Solved Threads: 2
Junior Poster in Training
stoymigo is offline Offline
52 posts
since Aug 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: file read/write question
Next Thread in C# Forum Timeline: deploying my c# application and save state problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC