Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
首先,在您的 Visual Studio 2012 專案中按右鍵,選擇”市集”->”建立應用程式套件”:
然後依以下步驟建立應用程式套件 (Application Package):
點選輸出位置之後,就會看到您的套件 (Application Package) 被包成一個 .appxupload 檔,加上一個資料夾 (output location)。
接下來只要把這整包 ( .appxupload 檔 + 資料夾) 整份 copy 到要測試的機器上,然後在此資料夾中找到一個 Add-AppDevPackage.ps1 的檔案,按右鍵以 PowerShell 執行即可。
以上這種作法稱為 Sideloading,但有兩點是需要注意的:
1. 這台機器必需有一個有效的 Developer License: 作法是在以系統管理員身份開啟的 PowerShell 介面中執行: Show-WindowsDeveloperLicenseRegistration, 然後再輸入你的 Microsoft ID (及以前的MSN 帳號或 Live ID),這台機器就會擁有 3 個月期限的 Developer License.
2. 確保這台機器可以執行 PowerShell scripts: 作法是在 PowerShell 介面中執行: Set-ExecutionPolicy unrestricted 即可.
以上的這兩點,在同一台機器上只要作一次就好了,然後就可以在這台機器上安裝任何經由 Visual Studio 2012 打包出來的 Windows Store App!
ARM-based 的機器?
不論你的機器是 Intel-based (x86/x64) 或是 ARM-based 的 CPU,都可以用以上的方式來佈署。
除了以上的方法,Visual Studio 2012 還提供了「遠端電腦」方式來作測試:
詳細設定則請參考 MSDN 的文章: 在遠端電腦執行 Windows 市集應用程式。