Visual Studio 2022 HTML snippets not loading.

dron andrei marian 0 Reputation points
2023-06-27T11:13:52.29+00:00

Neither my custom HTML snippets or the default Microsoft ones are loading

Microsoft Visual Studio Professional 2022 (64-bit) - Current

Version 17.4.3

Here are some of the errors visible in the console:

C:\Program Files\Microsoft Visual Studio\2022\Professional\Web\Snippets\HTML\1033\HTML\html.snippet: Missing or unspecified Language attribute

C:\Program Files\Microsoft Visual Studio\2022\Professional\Web\Snippets\HTML\1033\ASP.NET\checkbox.snippet: Missing or unspecified Language attribute

C:\Program Files\Microsoft Visual Studio\2022\Professional\Web\Snippets\HTML\1033\ASP.NET\repeater.snippet: Missing or unspecified Language attribute

C:\Program Files\Microsoft Visual Studio\2022\Professional\Web\Snippets\HTML\1033\ASP.NET\validationsummary.snippet: Missing or unspecified Language attribute

\Documents\Visual Studio 2022\Code Snippets\Visual Web Developer\My HTML Snippets\html.snippets.xml.snippet: Missing or unspecified Language attribute

I checked for example the code of html.snippet from microsoft:

<CodeSnippet Format="1.1.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <Header>
    <Title>html</Title>
    <Author>Microsoft Corporation</Author>
    <Shortcut>html</Shortcut>
    <Description>Markup snippet for a html element</Description>
    <SnippetTypes>
      <SnippetType>Expansion</SnippetType>
      <SnippetType>SurroundsWith</SnippetType>
    </SnippetTypes>
  </Header>
  <Snippet>
    <Code Language="html"><![CDATA[<html xmlns="http://www.w3.org/1999/xhtml">
    <head><title></title></head>
    <body>$selected$$end$</body>
</html>]]></Code>
  </Snippet>
</CodeSnippet>

Language is set.

Not of the snippets show in the HTML editor.

Developer technologies Visual Studio Other
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-07-13T13:44:58.1666667+00:00

    Hi @dron andrei marian, 

    I tested on the latest version of VS2022 Community version 17.6.5. It works fine.

    Please update your VS and try again. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

     


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.