CodeSnippets Manager
CodeSnippets Manager
I have two problems. First, I added a subdirectory to MyCodeSnippets called Exceptions. However, no 'plus' sign appears to the left of the MyCodeSnippets Folder. How can I get subdirectories to produce a plus sign next to the mysnippets directory?
Second, if I want to add my own code to this Exceptions folder, how do I do it. Imports wants a file that contains a 'CodeSnippets' type. I copied my code to a text file, navigated to it, but of course it doesn't appear. I typed in *.*. Then it appeared. I selected it but the code snippet manager rejected it because it wasn't a code snippet file.
So how can I import my own code?
dennist
[699 byte] By [
dennist] at [2008-1-19]
The first problem is because of the vb build in snippets are maintained in an XML file under <vb installation folder>\snippets\<language id>\SnippetIndex.xml
For the second, you can create a vb code snippet file thru the code editor window using the context menu->create snippet
I'm afraid that when I select code, the context menu only says insert snipped, not create snippet. No matter what I tried, I couldn't get the context menu to offer create snippet
dennist
In Beta 2 we are not properly registering the My Code Snippets folder, you should see an exclamation mark next to that folder in the Code Snippet Manager. To correct this you'll need to remove and re-add that folder by:
1) Open the Code Snippet Manager and select the My Code Snippets folder
2) Click Remove
3) Click Add and navigate to the proper folder \My Documents\Visual Studio 2005\Code Snippets\Visual Basic\My Code Snippets
Now you'll be able to add sub-folders and snippets to your My Code Snippets folder and have them appear in the Insert Snippet dialod and the Code Snippet Manager.
To create your own code snippets you'll need to author a .snippet file and can do this using the Code Snippet Editor we've just released today on MSDN (http://msdn.microsoft.com/vbasic/downloads/2005/tools/snippeteditor/). This editor will allow you to copy/paste the VB code and define the replacements and other attributes of your snippet without diving into the underlying XML format.
Hope this helps,
Jay
thank you very much. I was just about to keep my snippets in a clipboard extender. That still might be an easier way.
dennist
edit: I tried several times to download it. The dialog window comes on the screen. I click save. Nothing further happens. It's not in the process window, not in the internet explorer group in the bottom, not in the application tab in the task manager.
dennist