如何使用 VSTS 2008 Database Edition GDR 版本编辑数据库对象的默认模板

发布于 2024-07-12 10:40:51 字数 554 浏览 6 评论 0原文

我正在尝试使用 Visual Studio Team System 2008 数据库版(GDR 版本)来完成我正在开发的一个新项目,并且遇到了一个有点烦人的问题,我希望有人知道如何解决该问题。

简而言之,我想更改用于生成数据库对象(特别是存储过程)的默认模板。 过去,使用 SSMS,我只是创建了自己的模板,其中包含格式、默认参数数量等,我通常会在创建新存储过程时使用这些模板。 这显然消除了大量的手工编码,并且对我来说“感觉正确”,在我的 T-SQL 代码中保持一定的一致性。

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

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

有谁知道如何做到这一点? 我在 MSDN 或 DBPro 团队的博客上找不到任何文档,但我感觉这是可以做到的。 任何帮助或建议将不胜感激。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

醉城メ夜风 2024-07-19 10:40:51

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文