封裝 (應用程式安裝程式架構)

Package 元素會指定封裝的相關資訊,其中包括名稱、發行者、版本和 uri。 ProcessorArchitecture 是封裝的選擇性屬性。

元素階層

<AppInstaller>
<OptionalPackages>
<套件>
<RelatedPackages>
<套件>
<相依性>
<套件>

語法

<Package 
    Name                    = A string between 3 and 50 characters in length that consists of alpha-numeric, period, and dash characters.
    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".
    ProcessorArchitecture?  = "x86" | "x64" | "arm" | "neutral"
    Uri                     = Uri to the app package location />

屬性和項目

屬性

屬性 描述 資料類型 必要
Name 封裝資訊清單中的 identity 元素所指定的名稱。 Name 屬性不區分大小寫。 長度介於3到50個字元之間的字串,由英數位元、句號和虛線字元所組成。 Yes
Publisher Publisher,如封裝資訊清單中的 identity 元素所指定。 介於1到8192個字元之間的字串,長度符合辨別名稱的正則運算式。 此外,語意驗證可確保字串符合 CertNameToStr Windows API 實作為500規則的規範。 Yes
版本 封裝資訊清單中 identity 元素所指定的版本。 四個標記法中的版本字串: Yes
ProcessorArchitecture 描述封裝所包含之程式碼的架構。 包含可執行程式碼的封裝必須包含這個屬性。 "x86" 或 "x64" 或 "arm" 或 "中性" No
Uri 應用程式套件位置的 Uri URI Yes

父項目

父項目 描述
OptionalPackages 指定選擇性套件
RelatedPackages 指定相關的封裝。 不會安裝這些套件。
Dependencies (相依性) 這些是需要時才會安裝的相依性。

需求

Namespace http://schemas.microsoft.com/appx/appinstaller/2017