Dabblernl
Dabblernl

Reputation: 16121

Is there a size limit on code snippets in Visual Studio 2008?

I created a long code snippet with Snippet Editor. After saving I can see and use it within Visual Studio, however, the code is suddenly trunctated after about 120 lines and there appears some garbled text at the end. Is there a size limit to code snippets? If yes, is this a visual studio, or a Snippet Editor "feature"?

Upvotes: 5

Views: 423

Answers (2)

Dabblernl
Dabblernl

Reputation: 16121

Snippets can be of at least a fairly big size: there was a coding error in the Snippet:

I used %Replace$ in stead of $Replace$. Seemingly the snippet engine crashed on this typo.

Upvotes: 1

Hans Passant
Hans Passant

Reputation: 941695

Sounds to me you've found a buffer overflow bug in Visual Studio. You're well past the typical usage scenario for snippets, this wouldn't be tested often. Post your bug to connect.microsoft.com for feedback. Don't forget to document the service pack and IDE you use, as well as including the snippet. You didn't do that in your question but that's the only way anybody can truly diagnose this issue.

Upvotes: 3

Related Questions