Application Manifest File for Windows Phone
March 22, 2012
Each Windows Phone application has a manifest file that contains details about the application, such as the App ID and the capabilities that the application uses. This topic defines the elements, tags, and attributes in the application manifest file. The manifest file is called WMAppManifest.xml, and you can find it in the Properties folder of your project in the Solution Explorer window in Visual Studio, or by using Windows Explorer.
Note: |
|---|
The manifest files for Silverlight applications and XNA Framework applications are the same except for a few attribute value differences, noted in the sections that follow. |
The primary purpose of the manifest file is the following:
When you submit your applications to the Windows Phone Marketplace, information from the manifest file is used in the certification process, to filter your application correctly in the Windows Phone Marketplace, and to deploy and run your application on physical devices.
The information from the manifest file is stored as metadata in the application database.
This topic contains the following sections:
The application manifest file is generated in Visual Studio, and you should not edit the file manually. For most scenarios, the manifest file should be modified only by changing values in the project properties page in Visual Studio. Some of the values in the manifest file will be updated automatically after you submit your application to the Windows Phone Marketplace. Examples include the Author, Publisher, and ProductID attributes, and the CAPABILITIES element.
Caution:
|
|---|
|
Your application may become unstable or unusable through file modification. |
One scenario in which you should edit the manifest file is when you use the Windows Phone Capability Detection Tool to determine the capabilities used by your application. For more information, see How to: Determine Application Capabilities.
The following is an example of a manifest file for a Windows Phone application.
<?xml version="1.0" encoding="utf-8"?>
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
<App xmlns="" ProductID="{GUID}" Title="[Project Name]" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="[Project Name] author" Description="Sample description" Publisher="[Project Name]">
<IconPath IsRelative="true" IsResource="false">ApplicationIcon.jpg</IconPath>
<Capabilities>
<Capability Name="ID_CAP_APPOINTMENTS"/>
<Capability Name="ID_CAP_CAMERA"/>
<Capability Name="ID_CAP_CONTACTS"/>
<Capability Name="ID_CAP_GAMERSERVICES"/>
<Capability Name="ID_CAP_IDENTITY_DEVICE"/>
<Capability Name="ID_CAP_IDENTITY_USER"/>
<Capability Name="ID_CAP_ISV_CAMERA"/>
<Capability Name="ID_CAP_LOCATION"/>
<Capability Name="ID_CAP_MEDIALIB"/>
<Capability Name="ID_CAP_MICROPHONE"/>
<Capability Name="ID_CAP_NETWORKING"/>
<Capability Name="ID_CAP_PHONEDIALER"/>
<Capability Name="ID_CAP_PUSH_NOTIFICATION"/>
<Capability Name="ID_CAP_SENSORS"/>
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/>
<Capability Name="ID_HW_FRONTCAMERA"/>
</Capabilities>
<Tasks>
<DefaultTask Name ="_default" NavigationPage="MainPage.xaml"/>
<ExtendedTask Name="" NavigationPage="" >
<BackgroundServiceAgent Name="" Source="" Specifier="" Type=""/>
</ExtendedTask>
</Tasks>
<Tokens>
<PrimaryToken TokenID="[Project Name]Token" TaskName="_default">
<TemplateType5>
<BackgroundImageURI IsRelative="true" IsResource="false">Background.jpg</BackgroundImageURI>
<Count>0</Count>
<Title>[Project Name]</Title>
</TemplateType5>
</PrimaryToken>
</Tokens>
<Extensions>
<Extension ConsumerID="" ExtensionName="" ExtraFile="" TaskID="" />
</Extensions>
</App>
</Deployment>
Note: |
|---|
The CAPABILITIES element in the preceding example may not match the one in the manifest file of your application. For more information, see The CAPABILITIES Element later in this topic. |
The DEPLOYMENT element is the root element. This provides application and localization information in the manifest file when deploying a Windows Phone application.
|
Attribute |
Type |
Definition |
|---|---|---|
|
xmlns |
String |
The XML namespace. The default value is http://schemas.microsoft.com/windowsphone/2009/deployment. |
|
AppPlatformVersion |
String |
The version of the Windows Phone SDK or the runtime binaries of the platform. The default value is 7.1. |
The APP element is a child of the DEPLOYMENT element. It supplies information such as the product ID, version, and type of application. The following table defines the attributes of the APP element.
|
Attribute |
Type |
Definition |
|---|---|---|
|
Author |
String |
The application author’s name. |
|
BitsPerPixel |
Integer |
16 or 32 bits per pixel. |
|
Description |
String |
The description of the application. |
|
Genre |
String |
The default value is either Apps.Normal or Apps.Game depending on the project type. Applications that use Apps.Normal appear in the application list on the phone. Applications that use Apps.Games appear in the Games Hub on the phone. |
|
HasSettings |
Boolean |
Indicates whether the application supports settings. |
|
HubType |
Integer |
Enables your application to appear in the Extras section of the Music + Videos Hub. It is used for testing before application submission, and must be manually entered in the manifest file. A value of 1 enables this functionality. |
|
IsBeta |
Boolean |
Indicates whether the application is a beta application. This has consequences for the application license. |
|
ProductID |
GUID |
The default value is the GUID for the project (128 bit). During the application submission process, a new product ID is inserted into the manifest file. |
|
Publisher |
String |
The publisher of the application. This default value is the name of the project. This attribute is required for certain types of applications, such as push-enabled applications. |
|
RuntimeType |
String |
The default value is Silverlight or XNA depending on the project type. |
|
SingleInstanceHost |
Boolean |
Indicates whether the application has a single instance host. |
|
Title |
String |
The title of the application that appears in the application list or Games Hub. The default value is the name of the project. |
|
Version |
Version String |
The default value is 1.0.0.0. |
|
xmlns |
String |
You can leave this value blank. |
The CAPABILITIES element is a child of the APP element. Windows Phone provides a capabilities-driven security model where a user must opt-in to certain functionality within the application. Some examples include using network-based services where a user could incur additional roaming charges if the use of the services was not disclosed in the application, or the use of push notifications that can also produce roaming charges. The primary goals of this capability model are to:
-
Ensure proper disclosure – Users must be notified if an application’s functionality poses security risks. They must opt-in to allow the functionality to be activated.
-
Decrease the attack surface – Capabilities are used to create a security chamber in which the application executes. This chamber is created once at install time and used from then on for the application. The following tables highlight the currently supported capabilities and their descriptions.
When you are developing your application, if you do not need to use a specific capability, you can remove the entry. However, if you do not use a capability when needed, you receive an UnauthorizedAccessException error with an “Access denied” message when you attempt to use the functionality in the application. For more information, see How to: Determine Application Capabilities.
The CAPABILITY Element
The CAPABILITY element is a child of the CAPABILITIES element. The CAPABILITY element has one attribute, name. The following table lists the possible values of the name attribute.
|
Value |
Type |
Description |
|---|---|---|
|
ID_CAP_APPOINTMENTS |
String |
Applications that access appointment data. |
|
ID_CAP_CAMERA |
String |
Applications that use the camera capabilities. This value is for use by Mobile Operators and Original Equipment Manufacturers only. Application developers use ID_CAP_ISV_CAMERA instead. |
|
ID_CAP_CONTACTS |
String |
Applications that access contact data. |
|
ID_CAP_GAMERSERVICES |
String |
Applications that can interact with Xbox LIVE APIs. This must be disclosed due to privacy issues since data is shared with Xbox. |
|
ID_CAP_IDENTITY_DEVICE |
String |
Applications that use device-specific information such as a unique device ID, manufacturer name, or model name. |
|
ID_CAP_IDENTITY_USER |
String |
Applications that use the anonymous LiveID to uniquely identify the user in an anonymous fashion. |
|
ID_CAP_ISV_CAMERA |
String |
Applications that use the primary or front-facing camera. |
|
ID_CAP_LOCATION |
String |
Applications with access to location services. |
|
ID_CAP_MEDIALIB |
String |
Applications that can access the media library. |
|
ID_CAP_MICROPHONE |
String |
Applications that use the microphone. The application can record without a visual indication that recording is taking place. |
|
ID_CAP_NETWORKING |
String |
Applications with access to network services. This must be disclosed because services can incur charges when a phone is roaming. |
|
ID_CAP_PHONEDIALER |
String |
Applications that can place phone calls. This may happen without a visual indication for the end user. |
|
ID_CAP_PUSH_NOTIFICATION |
String |
Applications that can receive push notifications from an Internet service. This must be disclosed because usage could incur roaming charges. |
|
ID_CAP_SENSORS |
String |
Applications that use the Windows Phone sensors. |
|
ID_CAP_WEBBROWSERCOMPONENT |
String |
Applications that use the web browser component. There are security risks with scripting. |
|
ID_HW_FRONTCAMERA |
String |
Applications that have features which require the front-facing camera. If a front-facing camera is not present on the user’s device, Marketplace warns the user that some features of the application might not work because their phone does not have a front-facing camera. This capability is not required to use the front-facing camera; it is only used to trigger the said warning when applicable. For more information, see the Capabilities section in Camera and Photos Overview for Windows Phone. This capability is not automatically added to new projects. You must add it manually. |
The REQUIREMENTS element is a child of the APP element and should immediately follow the CAPABILITIES element. Beginning in Windows Phone SDK 7.1.1 Update, use the REQUIREMENTS element to indicate if the application requires certain hardware. For example, if the application will not run on a 256-MB device, you should specify it in this section. The primary goal of this element is to block users from purchasing or installing applications that will not run on their device.
A REQUIREMENTS element is not required in your manifest file if the application can run on 256-MB devices and there are no other special hardware requirements
The REQUIREMENT Element
The REQUIREMENT element is a child of the REQUIREMENTS element. The REQUIREMENT element has one attribute, name, which accepts a string value. The following table lists the possible values of the name attribute.
|
Value |
Description |
|---|---|
|
ID_REQ_MEMORY_90 |
Indicates the application requires more than 90 MB of memory and is not suited for a 256-MB device. For more information see, Developing for 256-MB Devices. Note:Including this requirement in the application manifest will not prevent the application from being deployed from Visual Studio to the 256-MB Windows Phone Emulator or to a tethered 256-MB device. |
The TASKS element is a child of the APP element. This element is for internal use only.
|
Attribute |
Type |
Description |
|---|---|---|
|
Name |
String |
The name of the task. The default value is _default. |
|
NavigationPage |
String |
The page in the application that a task navigates to when it starts. |
The EXTENDEDTASKS Element
The EXTENDEDTASKS element is a child of the TASKS element and contains BACKGROUNDSERVICEAGENT elements. This element defines the use of multiple tasks by an application. Extended tasks are named by the developer. Currently, you can use the EXTENDEDTASKS element only to define background tasks.
|
Attribute |
Type |
Description |
|---|---|---|
|
Name |
String |
The name of the task. |
|
NavigationPage |
String |
The page in the application that a task navigates to when it starts. |
The BACKGROUNDSERVICEAGENT Element
The BACKGROUNDSERVICEAGENT element is a child of the EXTENDEDTASKS element and contains the details of a background service agent used by the application.
|
Attribute |
Type |
Description |
|---|---|---|
|
Name |
String |
The name of the assembly. |
|
Source |
String |
The assembly source file. |
|
Specifier |
String |
AudioPlayerAgent, AudioStreamingAgent, or ScheduledTaskAgent. |
|
Type |
String |
The full class name of the entry point in the assembly. |
The TOKENS element is a child of the APP element. Each application has a Tile that the user can pin to the Start screen. The following sections provide the names and describe the elements and attributes for Tiles in the manifest file. For more information, see Tiles Overview for Windows Phone.
The PRIMARYTOKEN element
The PRIMARYTOKEN element is a child of the TOKENS element. It describes the Tile that is associated with an application.
|
Attribute |
Type |
Description |
|---|---|---|
|
TokenID |
String |
The name of the Tile. The default value is the project name. Caution:If you change the TokenID of your primary token, it should not match the TokenID of any of your secondary Tiles. In that case, users may not be able to install updates to the application. |
|
TaskName |
String |
The name of the task that the Tile invokes when the user taps it. The default value is _default. |
The TEMPLATETYPE5 Element
The TEMPLATETYPE5 element is a child of the PRIMARYTOKEN element. It is the default template that controls application Tiles. The following table describes the child elements of the TEMPLATETYPE5 element.
|
Element |
Type |
Description |
|---|---|---|
|
BACKGROUNDIMAGEURI |
String |
The name of the local or remote resource that contains the background image of the Tile. |
|
COUNT |
Integer |
A Tile can contain a counter that displays a value between 0 and 99. If the value is 0, the counter does not appear on the Tile. |
|
TITLE |
String |
The title that appears on the Tile. The default value is the name of the project. |
The EXTENSIONS element is a child of the APP element. This element is used to specify the extensions that your application supports. For more information, see Search Extensibility Overview for Windows Phone.
The EXTENSION Element
The EXTENSION element is a child of the EXTENSIONS element.
|
Attribute |
Type |
Description |
|---|---|---|
|
ConsumerID |
GUID |
Restricts access to the extension to the consumer with the specified ProductID. All search extensions require the same value, 5B04B775-356B-4AA0-AAF8-6491FFEA5661. |
|
ExtensionName |
String |
Identifier for the type of extension support. |
|
ExtraFile |
String |
Specifies the location of the Extras.xml file. The file must reside in a folder named Extensions and be named Extras.xml. |
|
TaskID |
String |
Routes the invocation to the specified TaskID. If this attribute is not specified, invocation is routed to the default task. |
Note:
Caution: