Defines a globally unique identifier for a package. A package identity is represented as a tuple of attributes of the package.
<Identity Name = A string between 3 and 50 characters in length that consists of alpha-numeric, period, and dash characters. ProcessorArchitecture? = "x86" | "x64" | "arm" | "neutral" Publisher = A string between 1 and 8192 characters in length that fits the regular expression of a distinguished name : "(CN|L|O|OU|E|C|S|STREET|T|G|I|SN|DC|SERIALNUMBER|(OID\.(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))+))=(([^,+="<>#;])+|".*")(, ((CN|L|O|OU|E|C|S|STREET|T|G|I|SN|DC|SERIALNUMBER|(OID\.(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))+))=(([^,+="<>#;])+|".*")))*". Further, semantic validation ensures that the string is compliant with CertNameToStr Windows API implementation of X.500 rules. Version = A version string in quad notation, "Major.Minor.Build.Revision". ResourceId? = A string between 1 and 30 characters in length that consists of alpha-numeric, period, and dash characters. />
? optional (zero or one)
Attributes and Elements
|Attribute||Description||Data type||Required||Default value|
Describes the contents of the package. The Name attribute is case-insensitive.
Use the DisplayName attribute to display a package name to users.
|A string between 3 and 50 characters in length that consists of alpha-numeric, period, and dash characters.||Yes|
Describes the architecture of the code contained in the package. A package that includes executable code must include this attribute.
This attribute can have one of the following values:
Describes the publisher information. The Publisher attribute must match the publisher subject information of the certificate used to sign a package. For more information see Packaging apps
|A string between 1 and 8192 characters in length that fits the regular expression of a distinguished name : "(CN|L|O|OU|E|C|S|STREET|T|G|I|SN|DC|SERIALNUMBER|(OID.(0|[1-9][0-9])(.(0|[1-9][0-9]))+))=(([^,+="<>#;])+|".")(, ((CN|L|O|OU|E|C|S|STREET|T|G|I|SN|DC|SERIALNUMBER|(OID.(0|[1-9][0-9])(.(0|[1-9][0-9]))+))=(([^,+="<>#;])+|".")))*". Further, semantic validation ensures that the string is compliant with CertNameToStr Windows API implementation of X.500 rules.||Yes|
Describes the type of UI resources contained in the package. The ResourceId is a publisher-specified string.
|A string between 1 and 30 characters in length that consists of alpha-numeric, period, and dash characters.||No|
The version number of the package.
|A version string in quad notation, "Major.Minor.Build.Revision".||Yes|
Defines the root element of an app package manifest. The manifest describes the structure and capabilities of the software to the system.
For the Name and ResourceID strings, the following rules must be followed:
- Allowed Input Characters = ASCII subset
- Uppercase letters (U+0041 thru U+005A)
- Lowercase letters (U+0061 thru U+007A)
- Numbers (U+0030 thru U+0039)
- Dot (U+002E)
- Dash (U+002D)
- Prohibited Strings
- Cannot equal…
- ".", "..", "con", "prn", "aux", "nul", "com1", "com2", "com3", "com4", "com5", "com6", "com7", "com8", "com9", "lpt1", "lpt2", "lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9"
- Cannot begin with…
- "con.", "prn.", "aux.", "nul.", "com1.", "com2.", "com3.", "com4.", "com5.", "com6.", "com7.", "com8.", "com9.", "lpt1.", "lpt2.", "lpt3.", "lpt4.", "lpt5.", "lpt6.", "lpt7.", "lpt8.", "lpt9.", "xn--"
- Cannot end with…
- Cannot contain…
- Cannot equal…
The Name attribute is used by the operating system and developers to identify packages. The Name attribute is not intended to be displayed to end users.
When an app is based on different resource packages, the ResourceId attribute must be unique across the user account for a given package name. Main package variants based on resource IDs are not allowed to be installed simultaneously. However, multiple simultaneous variants of a resource-only package are allowed. Examples of possible ResoureId attributes include:
- North America
- European Languages
The Publisher attribute is validated against the subject name of the signing certificate when signed packages are opened. If the Publisher attribute doesn't exactly match the subject name, the package is invalid. You can construct multiple semantically-equivalent string representations from the subject name that is stored in the certificate. Use these canonicalization rules to match the Publisher attribute value to that subject name:
- Unicode values can be UTF-8 encoded.
- If the name contains the legacy e-mail component, the Internationalized Domain Name (IDN) is represented in Unicode form.
- Object identifiers (OIDs) with X.500 key names must use the X.500 key name (for example, CN, not 220.127.116.11).
- OIDs without X.500 key names are identified with the "OID." prefix (for example, OID.18.104.22.168).
- OID key names are separated from their values by an equal sign without extra spaces (for example, CN=JohnSmith).
- Multiple relative distinguished name (RDN) entries are separated by a comma followed by a space (for example, CN=JohnSmith, O=Contoso).
The RDN value has quotes around it only if it contains leading or trailing white space or one of the following characters (for example, CN=" JohnSmith", O="C++ Inc."):
- Comma (,)
- Plus sign (+)
- Equal sign (=)
- Inch mark (")
- Backslash followed by the letter n (\n)
- Less than sign (<)
- Greater than sign (>)
- Number sign (#)
- Semicolon (;)
The quotation character is an inch mark ("). If the RDN value contains an inch mark, the inch mark must have double quotes ("") in addition to being enclosed in quotes (for example, CN="William ""Bill"" Smith").
- Multivalued RDN are not allowed (for example, CN=JohnSmith + O=Contoso).
These rules follow the behavior of the CertNameToStr function, which can be used to determine the expected Publisher attribute value from a certificate.
The following example is taken from the package manifest of one of the SDK samples.
<Identity Name="Microsoft.SDKSamples.ApplicationDataSample" Version="22.214.171.124" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />