問題描述
我將 Visual Studio 11 Beta 與 SQL Server 數(shù)據(jù)庫項目和控制臺應用項目一起使用.每次我按 F5 來調(diào)試我的控制臺應用程序時,它都想部署數(shù)據(jù)庫項目.有什么辦法可以讓它不這樣做嗎?我找不到任何設置來阻止它.
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.
推薦答案
這里的問題是當你說我想要構建和部署(按 F5 這樣做是為了調(diào)試)你沒有'實際上不希望數(shù)據(jù)庫成為該部署的一部分.
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.
恐怕我沒有 VS 11 Beta,但這是通過在 Build Configuration 中禁用項目的 Deploy 來實現(xiàn)的.
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 2010 的截圖,希望你能找到等效的(抱歉,我找不到 2012 的 MS 文檔).
Below is a screenshot from VS 2010, hopefully you can find an equivalent (sorry, I couldn't find the MS documentation for 2012).
找到你不想部署的項目,并取消勾選部署列下的相關復選框.
Find the project you don't want to deploy, and uncheck the relevant check box under the Deploy column.
這篇關于調(diào)試時如何不部署 SQL Server 數(shù)據(jù)庫項目?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!