6

This custom code snippet used to show up when typing CR at the top of a C# source file in Visual Studio 2013:

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets  xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>Insert a Copyright notice</Title>
            <Shortcut>CR</Shortcut>
            <Description>Code snippet for the Copyright notice comment</Description>
            <Author>Pierre Arnaud</Author>
            <SnippetTypes>
              <SnippetType>Expansion</SnippetType>
            </SnippetTypes>
        </Header>
        <Snippet>
            <Code Language="csharp">
                <![CDATA[//  Copyright © 2015, EPSITEC SA, CH-1400 Yverdon-les-Bains, Switzerland$end$]]>
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>

In Visual Studio 2015, the code snippet CR does not show up in the suggestion if I place the cursor before the first using statement. The only suggestions which show up are the two Visual Studio provided extern and using snippets.

Any idea if I have to update the XML of this snippet for this to work again?

EDIT: I opened an issue on Microsoft Connect.

3
  • So I am not the only one experiencing this issues and explains why my devs not following practice. Commented Jun 21, 2016 at 2:05
  • check here: stackoverflow.com/questions/3956638/… Commented Jun 11, 2018 at 9:44
  • @StefanW. I am not using ReSharper in my case... Commented Jun 13, 2018 at 9:37

1 Answer 1

1

One work around I did discover is to move the cursor to the top of the code file and then press Ctrl+K, Ctrl+S (the surround with snippet shortcut). This brings up the code snippets, including the Copyright one I have locally. This can be selected. Not a great solution but it works until a fix is in place.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.