How does I Deploy a Windows 8 App to another Device for testing?

Source: Internet
Author: User

If your developing a new Windows 8 app and you want to test it on another device (e.g. Surface), you'll be need to use a tech Nique called sideloading. This can easily is done through a few steps that I ' ll describe in this post.

What is sideloading?

Windows 8 Store Apps is deployed through the Windows store. This could seem like an obvious statement. However, by default, only Windows Store Apps is permitted to install and run on Windows 8. When you install the apps from the Windows Store, a Windows Store signed app package is downloaded and installed on your Mac Hine. Since only Windows Store signed apps is permitted to being executed on Windows 8, it greatly reduces the introduction of MAL Ware. for development and enterprise scenarios, you can use a technique called sideloading to install and run apps that is not Windows Store signed. I ' ll cover development sideloading in the this post. If you is interested in how to use sideloading for line's business apps in a enterprise, please see this post.

Development sideloading

Development sideloading is used by the Visual Studio to deploy, Debug and test your app.

The general requirements for sideloading is:

    1. Your appx package needs to be signed.
    2. The certificate used for signing needs to be trusted.
    3. A policy (or registry key) needs to is set to allow trusted the apps to run.

On a development machine, these requirements is automatically met for your by Visual Studio. Visual Studio provides a self-signing test certificate that's used to sign the package. Also, when Visual Studio was installed, a registry key is set to allow trusted apps to run. Therefore, when you debug a Windows 8 Store app using Visual Studio, the app was test certificate signed, deployed, and all Owed to run.

How does I sideload My App on another PC or ARM Device?

In the order to deploy a app, you need a app package. Visual Studio has functionality to the Create an app, the can use to deploy your app to another. The following steps is how to create a local APP package.

    1. In Visual Studio Express, choose ' Create App package ' in the Store menu. Note:in Visual Studio Ultimate, the Store menu is in a different location. In the "Project" menu, use the "Store" option.
    2. In the ' Create APP Package ' Wizard, you'll want to Create a local package. Therefore, answer "No" to the "does you want to build a package to upload to the Windows Store". Notice The information text indicates this was the option for sideloading.
    3. The next dialog provides a choice of processor platforms to target. In the most cases, you would want to choose "any CPU". This would allow you to target all of the processor platforms and architectures. However, if you is using platform specific binaries in your app, you'll need to build separate packages for each platform .
    4. In my example, I'll just leave the default "any CPU" and click "Create" Note the wizard gives us a link to where the Packa GE was created.

If We click the link, here is a example of what are created:

Here are a quick summary of the relevant files in the package directory:

APPX Package (MYAPP_1.0.0.0_ANYCPU_DEBUG.APPX)

The appx package is a zip file of the "All" files for your app. This file gets deployed and installed into Windows. Try renaming the extension to ". zip" and open the zip file to see what's inside. Don ' t forget to change it back before you try and deploy it.

Developer Test Certificate (myapp_1.0.0.0_anycpu_debug.cer)

This is your development certificate. This is the certificate, the used to sign the APPX package.

PowerShell script (ADD-APPDEVPACKAGE.PS1)

This PowerShell script can is used to install the development certificate and install the APP.

Installing the APP on the Target machine

Everything need to deploy the app are included in the package directory created by Visual Studio. I usually copy the directory to a USB memory stick to transfer the app to the target machine. On the "Target machine", you just need to run the PowerShell script (ADD-APPDEVPACKAGE.PS1) to the deploy the app. You can do this easily by right clicking on the script and selecting "Run with PowerShell".

The first action performed by the script was to install the certificate. It needs to run elevated on order to perform this step. If PowerShell isn ' t running elevated, the script would prompt to start a elevated process to install the certificate.

You'll be warned and prompted to allow the certificate to be installed.

Once the certificate is installed and the app is installed.

Your app should now is installed on the target machine. You should is able to find the tile on the Start screen (usually at the end of the list):

The final requirement is to allow trusted apps to run. If your target machine had Visual Studio installed, this requirement would already be met. However, if you don't have Visual Studio installed, you can meet the requirement through Group Policy or setting a registr  Y key. For development purposes, it's usually easiest to set the registry key.

    • Use RegEdit to navigate to the KEY:HKEY_LOCAL_MACHINE\SOFTWARE\POLICIES\MICROSOFT\WINDOWS\APPX
    • Set Allowalltrustedapps (REG_DWORD) to the value of 1

Your app should now run to the target machine.

One final note ... This was the process for development sideloading.  There is a more formal process for enterprise sideloading. If you is interested in Enterprise Sideloading, please start with this post.

Source to:http://blogs.msdn.com/b/patricka/archive/2012/11/05/ How-do-i-deploy-a-windows-8-app-to-another-device-for-testing.aspx

How does I Deploy a Windows 8 App to another Device for testing?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.