Application Life-cycle Management in Windows 8

  • 4/15/2013

Application package

The application manifest contains all the application information the system needs to deploy it on a target machine. That could be the local machine or the Windows 8 Simulator, which you can use for testing and debugging purposes. The manifest also contains all the information needed to package the application for the Windows Store.

When you run an application using the F5 button, Visual Studio 2012 compiles the application, builds the application package, and asks the operating system to install the package on the developer machine or the Windows 8 Simulator.

Visual Studio lets you package and deploy the application on the Windows Store by using the Store | Create App Package feature. This menu item launches a Create App Packages wizard that guides you through the process to package the application and upload it to the store, or to simply build the package to use it on a developer machine, as you can see from the two options and associated descriptions in Figure 4-3.

Figure 4-3

Figure 4-3 The Create App Packages wizard.

If you choose the first option, you will be asked for the Windows Live ID associated with your Windows Store account to publish the application. In both cases, the last step of the wizard lets you choose the processor architecture for which to build the application, and then it creates the package (see Figure 4-4).

Figure 4-4

Figure 4-4 The Create App Packages wizard lets you choose the output location, version, and configuration.

The package contains one binary file that represents the application and a folder with four different files:

  • <App Name_Version_Compilation>.appxupload This is the real “package,” and it contains the compiled application to be installed. For example, the application Learn with the Animals, version 1.0.0.6 for Any CPU is packaged in a file called LearnwiththeAnimals_1.0.0.6_AnyCPU.appxupload. This is the file for the Windows Store.

  • <App Name_Version_Compilation>.cer This is a certificate used to sign the application in the local development environment. The private key is contained in the .pfx file of the Visual Studio 2012 project. During the installation process, this certificate is added to the Trusted Root Certification Authorities of the local machine.

  • <App Name_Version_Compilation>.appxsym This file contains the debugging symbols.

  • Add-AppxDevPakage.bat This file contains the script to install the application, the signing certificate in the Trusted Root Certification Authorities, and all the dependencies the application needs to run.

When the application is installed on the system, Windows 8 creates a directory in X:\Users\<username>\AppData\Local\Packages\ using the globally unique identifier (GUID) associated with the application. This GUID is automatically generated when the Create App Packages wizard creates a new Windows Store application and is stored in the application manifest in the Identity tag, as shown in the following excerpt:

<Identity Name="380ac04e-991e-4e5f-8758-5f56e68b0e94" Publisher="CN=DevLeap"
    Version="1.0.0.2" />

You can uninstall an application at any time by selecting its tile and choosing Uninstall from the Windows 8 Start screen. As shown in Figure 4-5, you can also unpin the application by choosing the Unpin from Start item in the app bar. Doing so simply removes the tile from the Start screen and does not uninstall the application from the system. You can always reach the application again by pressing Windows+Q and searching within the installed apps.

Figure 4-5

Figure 4-5 The Windows 8 Start screen app bar.