從網路共用註冊套件配置Registering a package layout from a network share

共同作業和多裝置開發可能需要耗費大量時間,因為必須複製套件、存放庫、組建資料夾等。如果您是在 Windows 10 版本 1709 和更新版本上進行開發,則可以利用功能將套件配置建置到網路共用,然後直接從網路在遠端裝置上註冊該配置。Collaborative and multi-device development can be time consuming due to the need to copy packages, repositories, build folders etc. If you're developing on Windows 10 version 1709 and later you can take advantage of a feature to build your package layout to a network share and then register the layout on a remote device directly from the network.

多人可以參與網路共用上的單一應用程式套件配置,而且其他共同作業者和註冊應用程式的使用者都會看到變更。Multiple people can contribute to a single app package layout on a network share and changes will be visible to other collaborators and users who registered the app. 如果您要為多個裝置建置應用程式,則可以利用此功能,並避免必須將應用程式複製到每個裝置進行測試。If you are building an app for multiple devices you can take advantage of the feature and avoid having to copy the app to each device for testing.

必要條件Prerequisites

  1. 您的裝置必須是在 Windows 10 Creators Update Insider 組建 14965 或更新版本之上。Your devices must be on Windows 10 Creators Update Insider Build 14965 or later.

  2. 您將需要在所有裝置上啟用開發人員模式和裝置探索。You will need to enable developer mode and device discovery on all devices.

  3. 共同作業者將需要組建資料夾的讀寫權。Collaborators will need read and write access to the build folder.

  4. 使用者只需要組建資料夾的讀取權。Users will only need to read access to the build folder.

在 Visual Studio 中In Visual Studio

如果您是在 Visual Studio 中進行開發,則可以依照這裡概述的步驟。If you are developing in Visual Studio you can follow the steps outlined here.

從命令列中From the command line

如果您不是在 Visual Studio 中進行開發,而是使用命令列工具,則可以使用 WinDeployAppCmdIf you are not developing in Visual Studio, and using command line tools you can use WinDeployAppCmd. 以下是如何從命令列視窗執行此動作的範例:Below is an example of how to do so from a command line window:

WinAppDeployCmd.exe registerfiles -remotedeploydir <network path> -ip <IP Address> -pin <target machine PIN>
  • 網路路徑 – 應用程式鬆散檔案的路徑Network Path – Path to the app’s loose files

  • IP 位址 – 在這裡輸入目標電腦的 IP 位址P Address – enter the IP Address of the target machine here

  • Pin - 如果與目標裝置建立連線需要的 PIN。Pin - A pin if it is required to establish a connection with the target device. (如果需要驗證,系統會提示您使用 -pin 選項重試)。按一下這裡以了解如何取得 PIN。(You will be prompted to retry with the -pin option if authentication is required.) Click here to learn how to get a PIN.

您也可以建置完全封裝的應用程式,以在測試和驗證期間存取網路共用中的檔案。You can also build a fully packaged application that accesses files in a network share during testing and validation. 如需範例,請參閱此範例。See this sample for an example.