I tried to import this into the Code Snippets Manager and got the error “The snippet files chosen were not valid.” Since this is my first snippet, and the error message doesn’t deign to point out why the snippet is not valid, I am at a loss.
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>EDI Property</Title>
<Shortcut>edi</Shortcut>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>required</ID>
<ToolTip>required</ToolTip>
<Default>[Required]
</Default>
</Literal>
<Literal>
<ID>min</ID>
<ToolTip>min</ToolTip>
<Default>1</Default>
</Literal>
<Literal>
<ID>max</ID>
<ToolTip>max</ToolTip>
<Default>10</Default>
</Literal>
<Literal>
<ID>position</ID>
<ToolTip>position</ToolTip>
<Default>1</Default>
</Literal>
<Literal>
<ID>type</ID>
<ToolTip>type</ToolTip>
<Default>string</Default>
</Literal>
<Literal>
<ID>name</ID>
<ToolTip>name</ToolTip>
<Default>Property</Default>
</Literal>
</Declarations>
<Code Language="C#">
<![CDATA[
$required$[MinLength($min$)]
[MaxLength($max$)]
[ElementPosition($position$)]
public $type$ $name$ { get; set; }
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Your first line is wrong
remove the ending
</CodeSnippets>I’m checking against an example created by SnippetDesigner (recommended)
Looks like some tags are missing
also, I haven’t find an example where
but