Visual Studio 2010 数据库项目没有像 VS2008 过去那样创建临时数据库

发布于 2024-11-25 18:30:53 字数 377 浏览 2 评论 0原文

之前我们在本地 PC 上安装了 VS 2008,在本地 PC 上安装了 SQL Express 2005。当我们将SqlServer 2005数据库作为数据库项目导入VS 2008并打开该项目时,VS用于创建数据库实例,并在SQL Express中使用GUID作为其名称。这样,我在项目中所做的任何架构更改都会自动反映在 VS2008 创建的数据库中。这非常有帮助。

目前我们在Windows 2003 Server上安装了VS2010 Premium和SQL Sever2008 R2 Enterprise版本。当我将 2008 数据库导入 VS2010 数据库项目时,它导入正常,但不会自动创建临时开发/测试数据库。我是否缺少任何设置?如果没有,我是否必须进行更改并始终将部署脚本运行到开发/测试?

谢谢

Earlier we had VS 2008 installed on local PC and SQL Express 2005 installed on local PC. When we imported a SqlServer 2005 database as a database project into VS 2008 and open the project, VS used to create an instance of the database with a GUID as its name in SQL Express. This way any schema changes I was making in the project would automatically reflect in the database created by VS2008. This was very helpful.

Currently we have VS2010 Premium and SQL Sever2008 R2 Enterprise edition installed on Windows 2003 Server. When I import a 2008 database into VS2010 database project it imports fine but does not create a temporary dev/test database automatically. Are there any settings I am missing ? If there are none, do I have to make changes and run the deployment script to the dev/test all the time ?

Thanks

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

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

发布评论

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

评论(2

转身泪倾城 2024-12-02 18:30:53

我不确定这是否是您所需要的,但您可以通过数据库项目的部署页面配置和部署您的开发/测试数据库。在页面的组合框中选择“隔离开发环境”,并设置名称和与开发/测试数据库的连接。因此,您在一个项目中拥有两个数据库:“生产”和“沙盒”。

I'm not sure it is what you need, but you can configure and deploy your dev/test database via Deployment page of database project. Choose "Isolated development enviroment" in combobox at the page and setup name and connection to your dev/test database. So you have two databases: "production" and "sand box" in one project.

豆芽 2024-12-02 18:30:53

您还没有弄清楚为什么这个临时数据库对您有用。我相信在 VS2005 中它仅用于设计时验证。不再需要它来支持该功能。

如果您需要一个数据库用于测试目的,为什么不简单地从数据库项目部署一个数据库呢?

You haven't made it clear why this temporary database was useful to you. I believe that in VS2005 it was used solely for design-time validation. This is no longer needed to support the feature.

If you need a database for test purposes, why not simply deploy one from the database project?

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