Export code snippets from VS 2008

Please support our C# advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Aug 2008
Posts: 48
Reputation: stoymigo is an unknown quantity at this point 
Solved Threads: 2
stoymigo stoymigo is offline Offline
Light Poster

Export code snippets from VS 2008

 
0
  #1
Sep 11th, 2009
Hi,
how can i export code snippets from VS 2008 that i created to a different computer.
-Thanks
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,448
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 627
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Export code snippets from VS 2008

 
0
  #2
Sep 11th, 2009
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.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 48
Reputation: stoymigo is an unknown quantity at this point 
Solved Threads: 2
stoymigo stoymigo is offline Offline
Light Poster

Re: Export code snippets from VS 2008

 
0
  #3
Sep 11th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,448
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 627
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: Export code snippets from VS 2008

 
0
  #4
Sep 11th, 2009
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.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 48
Reputation: stoymigo is an unknown quantity at this point 
Solved Threads: 2
stoymigo stoymigo is offline Offline
Light Poster

Re: Export code snippets from VS 2008

 
0
  #5
Sep 11th, 2009
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
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum


Views: 264 | Replies: 4
Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC