管理專案和解決方案屬性

專案具有控管編譯、偵錯、測試和部署各個層面的屬性。 有些屬性是所有專案類型通用的,有些則是特定語言或平台特有的。

以滑鼠右鍵按一下 [方案總管]專案節點,然後選取 [屬性],或在功能表列的搜尋方塊中鍵入屬性,然後從結果中選取 [屬性視窗]

Screenshot of the Solution Explorer context menu with the Properties option highlighted.

Screenshot of the Solution Explorer context menu with the Properties option highlighted.

在專案樹狀結構本身,.NET 專案也可能具有屬性節點。

Screenshot of Solution Explorer with a Properties node showing.

注意

本主題適用於 Windows 上的 Visual Studio。 針對 Visual Studio for Mac,請參閱管理方案和專案屬性 (Visual Studio for Mac)

專案屬性

專案屬性會組織成群組,且每個群組都有自己的屬性頁。 不同的語言和專案類型可能有不同的頁面。

C#、Visual Basic 和 F# 專案

在 C#、Visual Basic 和 F# 專案中,屬性會在 [.NET 專案設計工具] 中公開。

下列螢幕擷取畫面顯示 C# 中主控台專案的 .NET 專案設計工具中的 [建置] 屬性頁面:

Screenshot of the Project Designer, with the Build tab selected.

Screenshot of the Project Designer, with the Build tab selected.

下列螢幕擷取畫面顯示 Visual Basic 中主控台專案的 .NET 專案設計工具中的 [編譯] 屬性頁面:

Screenshot of the Project Designer, with the Compile tab selected.

Screenshot of the Project Designer, with the Compile tab selected.

如需每個專案設計工具屬性的詳細資訊,請參閱什麼是 .NET 專案設計工具

提示

解決方案有一些屬性,專案項目也有;您可以在 [屬性視窗] 中 (而非 [.NET 專案設計工具]) 存取這些屬性。

C++ 和 JavaScript 專案

C++ 和 JavaScript 專案具有不同的使用者介面來管理專案屬性。 下列螢幕擷取畫面顯示 C++ 專案屬性頁面 (JavaScript 頁面也很類似):

Screenshot of the C++ project properties page.

如需 C++ 專案屬性的資訊,請參閱使用專案屬性 (C++)。 如需 JavaScript 屬性的詳細資訊,請參閱 JavaScript、屬性頁

解決方案屬性

若要存取解決方案上的屬性,請以滑鼠右鍵按一下 [方案總管] 中的方案節點,然後選取 [屬性]。 在對話方塊中,您可以設定 [偵錯] 或 [發行] 組建的專案組態、在按 F5 時選擇哪些專案應該要作為啟始專案,以及設定程式碼分析選項。

方案屬性會儲存在解決方案使用者選項 (.suo) 檔案中。 如需此檔案類型的詳細資訊,請參閱 [Visual Studio 中解決方案和專案] 頁面的「解決方案檔案一節。