El fragmento inserta una nueva línea adicional en VS2015


He creado un fragmento personalizado para usar en Visual Studio. En VS2013, funcionó como se esperaba, pero desde que lo usó en VS2015 (Community Edition) ha estado insertando una nueva línea adicional antes del código (justo cuando presiono tab/enter la segunda vez).

Esto parece ser solo un problema con el fragmento personalizado (los integrados funcionan bien). Alguien sabe qué podría estar causando esto? Es muy molesto.

Como nota al margen, esto solo sucede si estoy activando el fragmento en una línea vacía de código. Si lo hago después del código existente, la nueva línea no se inserta. Desafortunadamente, el fragmento es una declaración, por lo que esto no ayuda mucho.

Aquí está el fragmento, copiado casi en su totalidad de la muestra VS:

<?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>Insert Field Add</Title>

      <!-- The description of the snippet. -->
      <Description>Inserts a basic field add for a DataObject</Description>

      <!-- The author of the snippet. -->
      <Author>Thomas Price</Author>

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

      <!-- 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>
        <!-- Create any declarations that we use in the snippet. -->
        <Declarations>
          <Literal>
            <ID>FieldName</ID>
            <ToolTip>Enter the field name</ToolTip>
            <Default>field</Default>
          </Literal>
        </Declarations>

        <!-- Sepecify the code language and the actual snippet content. -->
        <Code Language="CSharp" Kind="any">
            <![CDATA[$FieldName$ = fields.add($FieldName$, "$FieldName$");]]>
        </Code>
    </Snippet>
</CodeSnippet>

Author: thomas88wp, 2015-12-12

1 answers

Puede evitar la nueva línea anterior colocando end end somewhere en algún lugar del texto del fragmento. Ejemplo:

<![CDATA[$FieldName$ = fields.add($FieldName$, "$FieldName$");$end$]]>
 38
Author: Craig A,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-01-06 16:53:35