如何:使用封裝瀏覽器加入和移除封裝的功能和專案How to: Add and remove features and items to a Package by using the Packaging Explorer

若要設定套件以部署 SharePoint 專案和功能,您可以使用封裝瀏覽器。To configure a package to deploy SharePoint items and Features, you can use the Packaging Explorer. 您可以調整 .wsp 檔案內的 SharePoint 專案專案和功能。You can adjust the SharePoint project items and Features inside your .wsp file.

或者,您也可以使用封裝設計工具來查看和重新排序功能,以變更啟用順序。Alternatively, you can use the Packaging Designer to view and re-order the Features to change the activation order. 如需詳細資訊,請參閱 如何:使用封裝設計工具加入和移除封裝的功能和專案For more information, see How to: Add and remove features and items to a package by using the Package Designer.

開啟封裝瀏覽器Open the Packaging Explorer

如果您的 Visual Studio 方案至少有一個 SharePoint 專案,您可以使用下列程式開啟封裝瀏覽器。You can use the following procedure to open the Packaging Explorer, if your Visual Studio solution has at least one SharePoint project. 或者,當您查看功能或封裝設計工具時,封裝瀏覽器會自動開啟。Alternatively, the Packaging Explorer opens automatically when you view a Feature or package designer. 關閉所有功能和封裝設計工具之後,封裝瀏覽器也會關閉。After you close all Feature and package designers, the Packaging Explorer also closes.

開啟封裝瀏覽器To open the Packaging Explorer

  1. 在功能表列上,選擇 [ View > Other Windows > 封裝瀏覽器]。On the menu bar, choose View > Other Windows > Packaging Explorer.

    封裝瀏覽器 會出現在 [工具箱] 中。The Packaging Explorer appears in the Toolbox.

將功能加入封裝中Adding a feature to a package

您可以使用封裝瀏覽器,將新的和現有的功能加入封裝中。You can add new and existing Features to a Package by using the Packaging Explorer.

若要加入 SharePoint 功能To add a SharePoint feature

  1. 開啟 封裝 Explorer,開啟專案的快捷方式功能表,然後選擇 [ 加入功能]。Open the Packaging Explorer, open the shortcut menu for the project, and then choose Add Feature.

移動現有的 SharePoint 功能To move an existing SharePoint Feature

  1. 開啟 [ 封裝瀏覽器],然後執行下列其中一個步驟:Open the Packaging Explorer, and then perform one of the following steps:

    • 功能 從一個專案拖曳至另一個專案。Drag a Feature from one project to another project.

    • 開啟功能的快捷方式功能表,選擇 [ 下],開啟要移動功能的專案快捷方式功能表,然後選擇 [ 上]。Open the shortcut menu for a Feature, choose Cut, open the shortcut menu for the project to which you want to move the Feature, and then choose Paste.

    注意

    如果您的方案中有一個以上的 SharePoint 專案,請使用此程序。Use this procedure if you have more than one SharePoint project in your solution.

驗證功能或封裝Validate a feature or package

您可以藉由驗證檔案來識別 SharePoint 功能和封裝中的潛在問題。You can identify potential problems in the SharePoint Features and packages by validating the files. 警告和錯誤會顯示在 [輸出] 視窗和 [錯誤清單] 視窗中。Warnings and errors are displayed in the Output window and Error List window.

驗證 SharePoint 功能或封裝To validate a SharePoint feature or package

  1. 開啟 [ 封裝瀏覽器]。Open the Packaging Explorer.

  2. 開啟功能或封裝的快捷方式功能表,然後選擇 [ 驗證]。Open a shortcut menu for a Feature or package, and then choose Validate.

另請參閱See also