Solved

Code Snippets in Visual Studio 2012

Posted on 2013-01-09
6
440 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 78

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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# Offline Apllication 5 55
VB.Net How to Exit Sub - Exit Form??? 5 51
iSeries email authority 4 25
Not seen Link button 5 15
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
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.
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 …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

896 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now