設定多個啟始專案Set multiple startup projects

Visual Studio for Mac 可讓您指定要在對解決方案進行偵錯或執行時啟動多個專案。Visual Studio for Mac allows you to specify that more than one project should be started when you debug or run your solution.

設定多個啟動專案To set multiple startup projects

  1. 在 [方案] 視窗中,選取最上層節點) 的解決方案 (。In the Solution Window, select the solution (the top node).

  2. 以滑鼠右鍵按一下解決方案節點,然後選取 [設定啟始專案]:Right-click the solution node and then select Set Startup Projects :

    選取 [設定啟始專案]

  3. [建立解決方案回合組態] 對話方塊隨即開啟。The Create Solution Run Configuration dialog box opens. 此對話方塊可讓您為解決方案建立新的具名解決方案回合組態。This dialog box allows you to create a new named Solution Run Configuration for your solution. 您可以使用任何名稱。You can use any name you like. 預設名稱為 Multiple ProjectsThe default name is Multiple Projects.

    [建立解決方案回合組態] 對話方塊

  4. 選取 [建立回合組態]。Select Create Run Configuration. [解決方案選項] 對話方塊隨即開啟,並已選取新的解決方案回合組態:The Solution Options dialog box opens with the new Solution Run Configuration selected:

    [解決方案選項] 對話方塊

  5. 選取您想在 Visual Studio for Mac 中對應用程式進行偵錯或執行時啟動的專案:Select the projects that you want to start when you debug or run your app from Visual Studio for Mac:

    已選取專案的 [解決方案選項] 對話方塊

  6. 選取 [確定]。Select OK. 新的解決方案回合組態會被設定為作用中的回合組態:The new Solution Run Configuration is set as the active run configuration:

    設定為在偵錯或執行時,要啟動多個專案的解決方案

    現在這兩個專案已設定為 [啟動],這是由 [方案] 視窗中顯示為 粗體 的兩個專案所代表。Now the two projects are configured to start, which is represented by both projects appearing bold in the Solution Window. 在工具列中,目前的解決方案回合組態是設定為新的回合組態。In the toolbar, the new run configuration is set as the current Solution Run Configuration.

後續步驟Next steps