数据库项目部署流程
我试图了解数据库项目如何在 Visual Studio 中工作。这是我到目前为止所做的:
- 在 SQL Management Studio 中创建了 SQL Express 2008 数据库。 (我可以在 Visual Studio 的服务器资源管理器中看到数据库和表)
- 在 Visual Studio 中创建一个数据库项目,并从我之前创建的数据库中导入对象。
现在我陷入困境,当我尝试部署在 Visual Studio 中所做的更改时,出现错误:
文件“blah blah.mdf”无法被覆盖。它正在被数据库“blah”使用
我的最终目标是在 Visual Studio 中拥有该数据库,这样我就可以将其添加到版本控制下,并部署团队中任何人对本地数据库所做的更改。
I am trying to understand how database projects work in Visual Studio. Here is what I have done so far:
- Created an SQL Express 2008 database in SQL Management Studio. (I can see the database and the tables in Server Explorer in Visual Studio)
- Created a database project in Visual Studio and imported the objects from the database I previously created.
Now I'm stuck, when I try to deploy changes I made in Visual Studio I get an error:
The file 'blah blah.mdf' cannot be overwritten. It is being used by database 'blah'
My end goal is to have the database in Visual Studio so I can add it under version control and deploy changes anyone in the team makes to the local database.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
删除
Schema Objects\Database Level Objects\Storage\Files
下的文件修复了该错误。Deleting the files under
Schema Objects\Database Level Objects\Storage\Files
fixed the error.