如何使用VSTS 2008 Database Edition GDR版本编辑数据库对象的默认模板 [英] How to edit default templates for database objects using VSTS 2008 Database Edition GDR Version

查看:278
本文介绍了如何使用VSTS 2008 Database Edition GDR版本编辑数据库对象的默认模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Visual Studio Team System 2008数据库版(GDR版本)提供一个正在进行的新项目,并遇到了一个令人烦恼的问题,我希望有人知道如何解决.

简而言之,我想更改用于生成数据库对象(尤其是存储过程)的默认模板.过去,使用SSMS,我仅创建了自己的模板,其中包含格式设置,默认参数数量等,在创建新的sproc时通常会使用这些模板.显然,这消除了大量的手工编码,并且让我感觉不错",使我的T-SQL代码具有一定的一致性.

我尝试通过添加我要使用的格式和默认结构来编辑位于.. \ Microsoft Visual Studio 9.0 \ DBPro \ Items中的.sql文件.不幸的是,我无法让VSTS识别这些更改.当我使用GUI添加新的存储过程时,它仍然使用默认的存储过程格式.

在进行这些调整之后,我尝试关闭Visual Studio并重新启动它,但这似乎没有任何效果.

有人知道该怎么做吗?我没有在MSDN或DBPro团队的博客上找到任何文档,但是我感觉可以做到.任何帮助或建议,将不胜感激.

解决方案

Microsoft Visual Studio 9.0 \ DBPro \ Items是旧目录.这些是错误的模板.正确的模板位于Microsoft Visual Studio 9.0 \ VSTSDB \ Extensions \ SqlServer \ Items中.编辑这些作品,您甚至不必关闭Visual Studio.

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.

解决方案

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.

这篇关于如何使用VSTS 2008 Database Edition GDR版本编辑数据库对象的默认模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆