身分識別 (Windows 10)

定義封裝的全域唯一識別碼。 封裝身分識別會以封裝屬性的 Tuple 表示。

元素階層

<套件>

    <身分識別>

語法

<Identity
  Name = 'A string with a value between 3 and 50 characters in length that consists of alpha-numeric, period, and dash characters. Additionally, it cannot be any of the folllowing string values: "CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", or "LPT9".'
  ProcessorArchitecture = 'An optional string that can have one of the following values: "x86", "x64", "arm", "arm64", or "neutral".'
  Publisher = 'A string with a value between 1 and 8192 characters in length that fits the regular expression of a distinguished name.'
  Version = 'A version string in quad notation, "Major.Minor.Build.Revision" where Major cannot be "0".' 
  ResourceId = 'An optional ASCII string with a value between 1 and 30 characters in length. Additionally, it cannot be any of the folllowing string values: "CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", or "LPT9".' />

屬性和元素

屬性

屬性 描述 資料類型 必要 預設值
名稱 描述封裝的內容。 Name屬性區分大小寫。 使用 DisplayName 屬性向使用者顯示套件名稱。 長度介於 3 到 50 個字元之間的字串,其中包含英數位、句號和虛線字元。 此外,它不能是任何不允許的字串值:CONPRNAUXNULCOM1COM2COM3COM4COM5COM6COM7COM8COM9LPT1LPT2LPT3、LPT4、LPT5LPT6LPT7、LPT8LPT9
ProcessorArchitecture 描述封裝中包含的程式碼架構。 包含可執行程式碼的套件必須包含這個屬性。 可具有下列其中一個值的選擇性字串:x86x64、arm、arm64中性 中性
發行者 描述發行者資訊。 Publisher屬性必須符合用來簽署封裝之憑證的發行者主體資訊。 如需詳細資訊,請參閱 封裝應用程式 長度介於 1 到 8192 個字元之間的字串,其符合辨別名稱的正則運算式。
ResourceId 描述封裝中包含的 UI 資源類型。 ResourceId是發行者指定的字串。 長度介於 1 到 30 個字元之間的選擇性 ASCII 字串。 此外,它不能是任何不允許的字串值:CONPRNAUXNULCOM1COM2COM3COM4COM5COM6COM7COM8COM9LPT1LPT2LPT3、LPT4、LPT5LPT6LPT7、LPT8LPT9
版本 套件 的版本 號碼。 四次標記法中的版本字串, Major.Minor.Build.Revision 其中 Major 不能是 0

子元素

無。

父元素

父元素 描述
套件 定義應用程式套件資訊清單的根項目。 資訊清單會描述軟體對系統的結構和功能。

範例

此範例來自 GitHub 上 應用程式套件資訊 範例的應用程式資訊清單檔案。

<Identity
  Name="Microsoft.SDKSamples.PackageSample.CS" 
  Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" 
  Version="1.0.1.0" />

規格需求

Item
Namespace http://schemas.microsoft.com/appx/manifest/foundation/windows10