Solved

Code Snippets in Visual Studio 2012

Posted on 2013-01-09
6
442 Views
Last Modified: 2013-03-19
Hi Experts,

  I have the below snippet and it doesn't show up in IntelliSense!  Why?

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/CodeSnippet">
  <CodeSnippet Format="1.0.0">

    <!-- The header contains information describing the snippet. -->
    <Header>

      <!-- The Title of the snippet, this will be shown in the snippets manager. -->
      <Title>For Loop - 0 base</Title>

      <!-- The description of the snippet. -->
      <!-- <Description>Inserts an Apex Notifying Property.</Description> -->

      <!-- The author of the snippet. -->
      <!-- <Author>Dave Kerr</Author> -->

      <!-- The set of characters that must be keyed in to insert the snippet. -->
      <Shortcut>forloop0</Shortcut>

      <!-- A URL for more help. -->
      <!-- <HelpUrl>http://apex.codeplex.com</HelpUrl> -->

      <!-- The set of snippet types we're dealing with - either Expansion or -->
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>

    </Header>

    <!-- Now we have the snippet itself. -->
    <Snippet>

      <!-- Sepecify the code language and the actual snippet content. -->
      <Code Language="CSharp" Kind="any">
        <![CDATA[
        for(int index = 0; index < variable; index++) 
        {
        
        }
        
        ]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>

Open in new window


It shows up in Snipet Manager:

Snippet manager
I try using it by typing forloop0, but InteliSense shows nothing!  This is a simple example, but I can save a lot of time using these if I can get it to work!

Thanks!
0
Comment
Question by:axnst2
  • 4
6 Comments
 

Author Comment

by:axnst2
ID: 38759948
I was able to access it by doing CTRL+K+X then it was under My Code Snippets!  It'll work though not sure why IntelliSense doesn't pick it up!  I'll keep this question open for a couple of days to see if anyone has better ideas!
0
 
LVL 80

Accepted Solution

by:
David Johnson, CD, MVP earned 250 total points
ID: 38760183
0
 

Author Comment

by:axnst2
ID: 38760901
Yeah that doesn't work...
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 250 total points
ID: 38760920
What are you typing within Intellisense? Your file appears to work for me:

Screenshot
0
 

Author Comment

by:axnst2
ID: 38767087
Yeah it doesn't do that for me....
0
 

Author Closing Comment

by:axnst2
ID: 38999265
It still doesn't work but thanks for the help!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question