Visual Studio 2010 数据库项目部署
在 Visual Studio 2010 中,可以为您的项目创建“部署包”。对于Web应用程序,您可以右键单击项目,然后选择“构建部署包”。
但是对于“数据库项目”,没有“构建部署包”选项。有“构建”和“部署”。当您检查数据库项目的属性时,在“部署”选项卡下,您可以创建部署脚本。这应该会生成一个 create-database.sql 脚本,另一个团队的某些 DBA 可以运行该脚本并部署您的数据库(与 IT 人员将 Web 应用程序的部署包导入 IIS 的含义相同)
但是当我构建了我的解决方案,包括数据库项目,我在任何地方都没有看到 create-database.sql 脚本?这是怎么回事?为什么数据库部署与 Web 应用程序部署不同?
部署流程应该是怎样的?
In Visual Studio 2010, it's possible to create "deployment packages" for your projects. For web applications, you can right-click the project, and choose "Build Deployment Package"
However for "Database Projects", there is no "Build Deployment Package" option. There's "Build", and "Deploy". When you check the properties of a Database project, under the "Deploy" tab, you can create a deployment script. This is supposed to generate a create-database.sql script that some DBA on another team can run and deploy your database (synonymous with an IT person importing a deployment package for a web application into IIS)
But when I build my solution, including the database project, I don't see the create-database.sql script anywhere? What's going on here? Why is the database deployment different than web application deployment?
What is the deployment process supposed to be?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
构建解决方案时不会创建部署脚本。您需要从构建菜单中选择“部署”,然后将根据您的项目设置创建脚本。
The deployment script isn't created when you build the solution. You need to select 'Deploy' from the build menu, then the script will be created according to your project settings.