How to edit default templates for database objects using VSTS 2008 Database Edition GDR Version

大憨熊 提交于 2019-12-12 18:23:21

问题


I'm giving Visual Studio Team System 2008 Database Edition (GDR Version) a go on a new project I'm working on and have come up against a slightly annoying problem that I am hoping someone knows how to resolve.

In a nutshell, I would like to alter the default templates used to generate database objects, particularly stored procedures. In the past, using SSMS, I have simply created my own templates which contain the formatting, default number of parameters, etc, that I would generally like to use whenever I create a new sproc. This obviously eliminates a good amount of hand coding and just "feels right" to me to have some consistency in my T-SQL code.

I've tried editing the .sql files located in ..\Microsoft Visual Studio 9.0\DBPro\Items by adding the formatting and default constructs I would like to use. Unfortunately, I haven't been able to get VSTS to recognize these changes. When I add a new stored procedure using the GUI it still uses the default stored procedure formatting.

I've tried shutting down Visual Studio and starting it back up after making these adjustments, but that doesn't seem to have any effect.

Does anyone know how to do this? I haven't been able to find any documentation on MSDN or the DBPro teams' blogs, but I have a feeling this can done. Any help or suggestions would be greatly appreciated.


回答1:


Microsoft Visual Studio 9.0\DBPro\Items is a legacy directory. These are the wrong templates. The right templates are in Microsoft Visual Studio 9.0\VSTSDB\Extensions\SqlServer\Items. Editing these works, and you don't even have to close visual studio.



来源:https://stackoverflow.com/questions/451032/how-to-edit-default-templates-for-database-objects-using-vsts-2008-database-edit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!