3

I have about 10 code snippets I want to use in a demo in Visual Studio 2010. Does each code snippet need to be stored in a separate snippetName.snippet file? Or, can I have all snippets in one file?

VS complains when I add a 2nd snippet to a file. Maybe I'm missing something though.

1 Answer 1

4

According to this the <CodeSnippets> element may contain multiple <CodeSnippet> elements. I'm not sure how you are adding your second code snippet to the file, but my guess would be to add another <CodeSnippet> section for each additional code snippet you wish to include.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. By default, adding a snippet does not create a parent <CodeSnippets> element. That was the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.