how to add a new line between using statements and namespace when using custom snippet RRS feed

  • Question

  • Now when I import namespaces it writes the using statements close to the namespace statement. I would like a line between them.


    <?xml version="1.0" encoding="utf-8"?>

    <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">  
    <CodeSnippet Format="1.0.0">    
    <Title>ICollection using defined entity</Title>      
    <Author>Stein Lundbeck</Author>      
    <Description>Code for implementing ICollection with defined entity</Description>      
    <Literal Editable="true">          
    <ToolTip>Name of type</ToolTip>          
    <Literal Editable="true">          
    <ToolTip>Type of generic object</ToolTip>          
    <Code Language="csharp" Delimiter="$" Kind="file"><![CDATA[  ICollection<$TEntity$> $Name$ = new Collection<$TEntity$>();]]>      


    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    namespace Test
        class MyClass
            ICollection<int> myColl = new Collection<int>();

    As you can see, there's no line between the using statements and the namespace statement

    Friday, May 29, 2020 6:14 AM

All replies

  • Hi line beneath using statements in custom snippet,

    There are no related elements which could implement it in snippet file. So I am afraid that you can't get the results you want at this stage. 

    Please refer the elements of snippet code here: https://docs.microsoft.com/en-us/visualstudio/ide/code-snippets-schema-reference?view=vs-2019#imports-element.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, June 1, 2020 8:59 AM