Wednesday, January 13, 2016

Visual Studio Snippets - Missing or unspecified language

    I have been getting a list of messages in the Snippets output window when I load a project that a number of snippets had a 'missing or unspecified language attribute' and could not figure out why these messages appeared. I had checked the Language attribute on the snippets and they were correct, but still got the message.  I had set up folders for each language type, but still got the messages. I finally figured out that I had specified they all were VB snippets in the Snippet manager and those that were not VB would cause the messages in the output window, ie when loading a VB project, the CSharp snippets would generate the error message.
   I fixed this by going into the snippet manager and specifying the Language, VB or CSharp, and adding the snippets to the correct language and removing them from the invalid language. And now these messages of invalid language attributes do not appear on my output screen.