Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"?

like image 310
Dabblernl Avatar asked Oct 14 '22 08:10

Dabblernl


2 Answers

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.

like image 109
Hans Passant Avatar answered Oct 20 '22 16:10

Hans Passant


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.

like image 44
Dabblernl Avatar answered Oct 20 '22 15:10

Dabblernl