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!
On the Development Box
- In Visual Studio 2012, double click the Package.appxmanifest for your app to open the Manifest Designer
- Select the Packaging tab
- Click Choose Certificate
- Click Configure Certificate and choose to create a test cert giving it a name that makes sense like “ContosoPOC”
- Update the Publisher display name (I did though it shouldn’t matter)
- Create your App package from the Project | Store menu
- Choose No when asked to build for upload to the Windows Store
- Copy the deployment folder to the destination tablet (via file share or USB, for example)
Prepare the Tablet (one-time steps)
- 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)
- 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
- Under Local Computer Policy, click to expand Computer Configuration | Administrative Templates | Windows Components | App Package Deployment.
- Double-click the Allow all trusted apps to install setting
- Click Enabled and then click OK
- Open PowerShell (I think this needs to be done as an Administrator)
- Use the Show-WindowsDeveloperLicenseRegistration PowerShell command to setup a temporary license to allow for unregistered apps
Install or Update the App
- Use PowerShell Add-AppxPackage command to install the app
- Repackage per the steps above and reinstall per the line above to deploy updates
- Deploying Metro sytle apps to businesses (MSDN Blogs)
- Packaging your app using Visual Studio 2012 (MSDN)
- How to Add and Remove Apps (Technet)
- Get a developer license (Dev Center – Metro style apps)
Nelson’s Blog Post
- Troubleshooting packaging, deployment, and query of
Metro style apps (Dev Center)