I have reach the point in my current project where I needed to get my application up and running on a device for testing. There are a number of articles out there on how to side load a Windows Store application, but I didn't find any that specifically dealt with multi-device hybrid applications.
The first device I managed to get my hands on for testing purposes is the Windows Surface RT running Windows 8.1 so the steps for side loading in this post are what worked for me on the RT, but should be the same for any other Windows 8.1 tablet.
The steps for side loading are as follows (assuming your multi-device project name is myProj):
Create the deployment package
- Build your solution
- Navigate to MyProj/bld/Debug/platforms/windows8/
- Copy the AppPackages folder to your memory stick
- Copy the AppPackages folder to your device
THE SHORT
- In Window Explorer: Navigate to AppPackages\CordovaApp_1.0.0.0_AnyCPU_Debug_Test
- Press on the Add-AppxDevPackage.ps1 and release. A context menu should appear.
- Tap the "Run with Powershell" menu item
- A powershell window should open
- Type:Add-AppxDevPackage.ps1
- Hit Enter and your application should install
If for whatever reason this is not the case continue reading.
THE LONG
Install the certificate
- On the device navigate to the AppPackages\CordovaApp_1.0.0.0_AnyCPU_Debug_Test folder
- Double tap on the CordovaApp_1.0.0.0_AnyCPU_Debug.cer security certificate
- The Certificate installation dialog should appear
- Tap on Install Certificate...
- Under Store Location select Local Machine
- Tap Next
- Select place all certificates in the following store
- Tap Browse...
- Select Trusted People
- Tap Ok, Tap Next, Tap Finish
- You should get a popup with the message "The import was successful."
Run Powershell as an administrator
- Tap the Windows key
- From the Windows 8 start screen type: powershell
- Press on the Windows Powershell application link that appears below the search box
- Let go after a brief pause and a context menu should appear
- Tap run as administrator
Ensure you have a developer license installed on the device
- Type: Show-WindowsDeveloperLicenseRegistration
- A window will appear and you will be prompted to enter your user name and password that is associated with your Microsoft developers license
- Enter your user name and password
- If you have the correct developers license you should be granted a developers license on the device.
Install the Appx package
- In the powershell window navigate to the AppPackages\CordovaApp_1.0.0.0_AnyCPU_Debug_Test folder
- Type: Add-AppDevPackage.ps1
- Hit enter
- If you receive and error about "running scripts is disabled"
- Type: Set-ExecutionPolicy RemoteSigned
- Type: Y
- Hit Enter
- Type: Add-AppDevPackage.ps1
NOTE: If you are installing your application on a device where the current user is not an administrator and after installation you can't find the application, open a new powershell session, but not as an administrator and then Type: Add-AppDevPackage.ps1
NOTE2: If you open the Add-AppDevPackage.ps1 in your favorite text editor, the comments in the file give you an idea of what
That should be it.