2016-03-22 62 views
0

我在VS2015中有兩種不同的解決方案,並且它們都有Tools > Options > Projects and Solutions > Build and Run中的方框For new solutions use the currently selected project as the startup project具有相同設置的兩種解決方案在Visual Studio 2015中顯示不同的行爲

但只是其中一個解決方案允許我通過單擊該項目或其任何依賴關係來更改要運行的新項目。對於其他解決方案,我必須使用鼠標右鍵單擊項目並選擇Set as startup project

究竟是什麼讓這兩種解決方案有這樣的不同行爲?

回答

2

這是解決方案的一個設置。

右鍵單擊您的解決方案

Properties -> Common Properties -> Startup Project -> Current Selection

當前選擇選項與單啓動項目多啓動項目一個單選按鈕是你的其他2個選項

enter image description here

CheckBox

Tools -> Options... -> Projects and Solutions -> Build and Run

enter image description here

用來設置默認爲創建

+0

非常感謝任何新的Visual Studio解決方案之前描述的設置。很好的答案。我不知道這個選項。但是,在'Tools'中暗示的框的目的是什麼? – Mao

+0

@ChairmanMao沒問題。不確定我知道你提到的框中的含義 –

+0

在我的問題中提到的「工具>選項>項目和解決方案>構建和運行」中打勾的框。 – Mao

相關問題