問(wèn)題描述
我將 Visual Studio 11 Beta 與 SQL Server 數(shù)據(jù)庫(kù)項(xiàng)目和控制臺(tái)應(yīng)用項(xiàng)目一起使用.每次我按 F5 來(lái)調(diào)試我的控制臺(tái)應(yīng)用程序時(shí),它都想部署數(shù)據(jù)庫(kù)項(xiàng)目.有什么辦法可以讓它不這樣做嗎?我找不到任何設(shè)置來(lái)阻止它.
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.
推薦答案
這里的問(wèn)題是當(dāng)你說(shuō)我想要構(gòu)建和部署(按 F5 這樣做是為了調(diào)試)你沒(méi)有'實(shí)際上不希望數(shù)據(jù)庫(kù)成為該部署的一部分.
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.
恐怕我沒(méi)有 VS 11 Beta,但這是通過(guò)在 Build Configuration 中禁用項(xiàng)目的 Deploy 來(lái)實(shí)現(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).
找到你不想部署的項(xiàng)目,并取消勾選部署列下的相關(guān)復(fù)選框.
Find the project you don't want to deploy, and uncheck the relevant check box under the Deploy column.
這篇關(guān)于調(diào)試時(shí)如何不部署 SQL Server 數(shù)據(jù)庫(kù)項(xiàng)目?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!