Visual Studio 2010: How to change stored procedure template
How does one change the stored procedure templates for Visual Studio in 2010 2008 database projects? I've tried changing the templates in C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\Templates\Database Project Items. This doesn't seem to affect the st开发者_开发技巧ored procedures created from the Add Item wizards in the database project. Am I missing something or does this method of changing stored procedure templates not work anymore? Thanks in advance.
I know it's not the exact answer you're after, but as a workaround you can edit code snippets at C:\Program Files\Microsoft Visual Studio 10.0\VSTSDB\Snippets\1033\Stored Procedure
When you add a new stored proc, remove the default code, right click in the code pane, and select "insert snippet".
I'll keep searching though for how to edit the new item templates though, as it's driving me nuts.
EDIT:
I kept searching, and found it: C:\Program Files\Microsoft Visual Studio 10.0\VSTSDB\Extensions\SqlServer\Items
create a project using the existing template.
edit it the way you want.
export the new template.
http://msdn.microsoft.com/en-us/magazine/cc188697.aspx
For Visual Studio 2015 you will find the SQL templates in this location:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\Items
精彩评论