Compartilhar via


Why can’t I create an app package? Windows Phone Xap vs. Appx

Differences between Windows Phone Silverlight apps and Windows Phone Store apps are a recurring source of confusion for Windows Phone developers.

A frequently asked question on the Windows Phone forums is “Why can’t I create an app package? When I go to the store menu it has only a ‘Launch Windows App Certification Kit…’ option”.

Silverlight project's Store menu

The reason is that the developer is writing a Windows Phone Silverlight app, and app packages are used only by Windows Runtime apps:

 Visual Studio Project TypePackage TypePackage Built
Silverlight Windows Phone Silverlight 8.0 Xap With project
Windows Phone Silverlight 8.1 Xap With project
Universal Windows 8.1 Appx By Store menu
Windows Phone 8.1 Appx By Store menu
Shared N/A N/A

 

Silverlight apps use xap files which are generated as part of the normal build process. They don’t have a separate packaging step. Build the app and look in the project's bin\<configuration> folder and you’ll find the xap. Build for Release and the bin\Release\<app>.xap file is ready to upload.

Directory listing with Xap file in \bin\Release

Universal apps (both Windows Store and Windows Phone Store apps) need to be built into app packages to be uploaded to the store, and this menu is the way to do that. When you build a Universal app for debugging the project files are built but not packaged for installation. The app doesn't need to be packaged until you are ready to upload it to the store or to send it to another machine for testing. If you deploy a Universal app’s Windows project locally you can examine the staged Appx in the project directory\bin\<configuration>\Appx. Windows Phone projects will create this directly to the phone. The compressed appx isn’t needed until you want to deploy the app to another system (i.e. for testing or release), and that file will be created in the project's AppPackages folder by the “Create App Packages…” menu.

With a Windows Store or Windows Phone Store project selected the menu looks likes this:

Runtime project's Store menu

If the solution or Shared project is selected the create options will be disabled:

Shared project's Store menu

 

- Rob

Follow the Windows Store Developer Solutions team on Twitter @wsdevsol.

Comments

  • Anonymous
    August 19, 2014
    Thank you.

  • Anonymous
    August 20, 2014
    So how does one create the App package and upload from the build server?

  • Anonymous
    September 06, 2014
    The comment has been removed

  • Anonymous
    September 22, 2014
    So it is, that's what I am wondering recently, thanks Rob.

  • Anonymous
    November 02, 2014
    You don't really point out that this is an unannounced change in Visual Studio Express 2013. Previously Silverlight apps did have the menu items to produce packages explicitly. One thing this provided was control over version number. There seem to be two files which have a version number specified, WMAppManifest.xml and Package.appxmanifest. I don't know which is supposed to provide the version number for the package. However when I try to provide an updated package it is not accepted because it does not have a higher version number than the current package, even though I have specified a higher number in both of these files. So now it's impossible for me to update my app. I put a query on the forum here: social.msdn.microsoft.com/.../set-version-number-for-silverlight-package

  • Anonymous
    February 05, 2015
    The comment has been removed

  • Anonymous
    August 20, 2015
    Nice! Thank you very much!!!