PAGES

24

Jul 12

Just tap it in: Sideloading a Win8 Metro LOB App for Testing Purposes



The Scenario

Sideloading is the term used for installing a Windows 8 Metro App without downloading it from the Windows Store.  Why it made me think of a line from Happy Gilmore, I’m not sure, but I’m going with it.  Sideloading is going to be a typical deployment scenario for line of business (LOB) apps, because they will be targeted and controlled and not meant for the general public.  While there is a fair amount of documentation on this topic and deployment in general, getting the steps straight for testing my proof of concept (POC) on a tablet without using Visual Studio took a little more thinking and tinkering than expected.

Much of the sideloading story involves use of Group Policy, having the device on the domain and PowerShell or Deployment Image Servicing and Management tooling.  This makes sense for the longer term enterprise deployment.  But early in the dev process, you’re not ready for all that.  Using a dev or test device that gets wiped often, facilitating an iterative POC effort, or using a preview release of Win 8 (which we all are right now) are all valid reasons not to domain join your tablet, for example.  The use case I’m thinking of is delivering some interim builds to a customer (who is not a developer with Visual Studio) for early feedback.  After talking to some other Clarity folks doing Win 8 development who were also thinking this through, I decided to put this post together to walk through the steps that seemed to work for me.

Disclaimer: in case it wasn’t clear, this is NOT the end all solution for a proper production deployment process, this is just a streamlined listing of steps to get the app running for the short term, and they apply to what worked for me on the Release Preview version of Win 8 on a Slate from Build.  I haven’t taken this beyond a quick sample and I think the WinRT/ARM devices will need a different story.  I’ll update this post if I learn anything new.  Lastly, I’ve referenced some of the documentation I used below to offer more detail.

Tap tap taparoo!

The Steps

On the Development Box

  1. In Visual Studio 2012, double click the Package.appxmanifest for your app to open the Manifest Designer
  2. Select the Packaging tab
  3. Click Choose Certificate
  4. Packaging

  5. Click Configure Certificate and choose to create a test cert giving it a name that makes sense like “ContosoPOC”
  6. Update the Publisher display name (I did though it shouldn’t matter)
  7. Create your App package from the Project | Store menu
    Create Package
  8. Choose No when asked to build for upload to the Windows Store
  9. Copy the deployment folder to the destination tablet (via file share or USB, for example)

Prepare the Tablet (one-time steps)

  1. Find the certificate file (.cer) in the package folder
    and install it to Local Machine | Trusted Root Certificate Authorities (this allows your dev app to be trusted – you would use a real cert for prod deployment)
  2. From the Start screen, type Edit Group Policy, click Settings, and then select the Edit Group Policy setting from the search results to open the Group Policy editor
  3. Under Local Computer Policy, click to expand Computer Configuration | Administrative Templates | Windows Components | App Package Deployment.
  4. Double-click the Allow all trusted apps to install setting
  5. Click Enabled and then click OK
  6. Open PowerShell (I think this needs to be done as an Administrator)
  7. Use the Show-WindowsDeveloperLicenseRegistration PowerShell command to setup a temporary license to allow for unregistered apps

Install or Update the App

  1. Use PowerShell Add-AppxPackage command to install the app
  2. add-appxpackage c:\Builds\ContosoExpense.appx
  3. Repackage per the steps above and reinstall per the line above to deploy updates

References

1 comment , permalink


Tagged ,