I type 'cw' press tab twice and bam 'Console.WriteLine()' appears. I then press enter and move to another line type 'cw' press tab twice and wtf 'cw.WriteLine()' appears.
I tried throwing my computer out the window but remembered that I need it.
First, please check whether the version of your VS2022 is the latest version, I am currently using VS community 17.4.4, and the code snippets shortcut 'cw' works fine on my side.
1, So first, please make sure you are based on the latest version of VS2022:
2, Second, you can try to reset the environment settings and turn off synchronized settings on a particular computer(If you don't encountered the issue when you don't login in please unselect the setting.)
Reset environment settings:
turn off synchronized settings on a particular computer:
]7
3, And please check whether other snippets have this problem, if not, I suggest you to create your own code snippets, import it and then try again.
Creat a file named xxx.snippet:
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>xxx</Title>
<Shortcut>xxx</Shortcut>
<Description>Code snippet for Console.WriteLine</Description>
<Author>Microsoft Corporation</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal Editable="false">
<ID>SystemConsole</ID>
<Function>SimpleTypeName(global::System.Console)</Function>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[$SystemConsole$.WriteLine($end$);]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
After that, import this code snippets:
After that, write xxx and double press Tab.