调试时如何不部署SQL Server数据库项目?

时间:2023-01-13 13:22:47

I'm using Visual Studio 11 Beta with a SQL Server Database project and a console app project. Every time I hit F5 to debug my console app, it wants to deploy the database project. Is there any way to keep it from doing that? I can't find any settings to prevent it.

我正在使用Visual Studio 11 Beta与SQL Server数据库项目和控制台应用程序项目。每次我按F5调试我的控制台应用程序,它都想部署数据库项目。有没有办法阻止它这样做?我找不到任何设置来阻止它。

2 个解决方案

#1


37  

The problem here is that when you say I want to build and deploy (hitting F5 does this in order to debug) you don't actually want the DB to be part of that deployment.

这里的问题是,当你说我想构建和部署时(点击F5这样做以便调试)你实际上并不希望数据库成为该部署的一部分。

I'm afraid I don't have VS 11 Beta, but this is achieved by disabling the Deploy of the project in the Build Configuration.

我担心我没有VS 11 Beta,但这是通过在Build Configuration中禁用项目的Deploy来实现的。

Below is a screenshot from VS 2010, hopefully you can find an equivalent (sorry, I couldn't find the MS documentation for 2012).

下面是VS 2010的截图,希望你能找到一个等价物(对不起,我找不到2012年的MS文档)。

Find the project you don't want to deploy, and uncheck the relevant check box under the Deploy column.

找到您不想部署的项目,并取消选中Deploy列下的相关复选框。

调试时如何不部署SQL Server数据库项目?

调试时如何不部署SQL Server数据库项目?

调试时如何不部署SQL Server数据库项目?

#2


4  

Double-click on the Properties node of the Database project in Solution Explorer to open the Database project properties. Select the Deploy tab. In the Deploy action section, select "Create a deployment script (.sql)" instead of "Create a deployment script (.sql) and deploy to the database".

在“解决方案资源管理器”中双击“数据库”项目的“属性”节点以打开“数据库”项目属性。选择“部署”选项卡。在“部署操作”部分中,选择“创建部署脚本(.sql)”而不是“创建部署脚本(.sql)并部署到数据库”。

#1


37  

The problem here is that when you say I want to build and deploy (hitting F5 does this in order to debug) you don't actually want the DB to be part of that deployment.

这里的问题是,当你说我想构建和部署时(点击F5这样做以便调试)你实际上并不希望数据库成为该部署的一部分。

I'm afraid I don't have VS 11 Beta, but this is achieved by disabling the Deploy of the project in the Build Configuration.

我担心我没有VS 11 Beta,但这是通过在Build Configuration中禁用项目的Deploy来实现的。

Below is a screenshot from VS 2010, hopefully you can find an equivalent (sorry, I couldn't find the MS documentation for 2012).

下面是VS 2010的截图,希望你能找到一个等价物(对不起,我找不到2012年的MS文档)。

Find the project you don't want to deploy, and uncheck the relevant check box under the Deploy column.

找到您不想部署的项目,并取消选中Deploy列下的相关复选框。

调试时如何不部署SQL Server数据库项目?

调试时如何不部署SQL Server数据库项目?

调试时如何不部署SQL Server数据库项目?

#2


4  

Double-click on the Properties node of the Database project in Solution Explorer to open the Database project properties. Select the Deploy tab. In the Deploy action section, select "Create a deployment script (.sql)" instead of "Create a deployment script (.sql) and deploy to the database".

在“解决方案资源管理器”中双击“数据库”项目的“属性”节点以打开“数据库”项目属性。选择“部署”选项卡。在“部署操作”部分中,选择“创建部署脚本(.sql)”而不是“创建部署脚本(.sql)并部署到数据库”。