共用方式為


適用于 Windows 8.1) 的 PackageDependency (擴充功能架構

宣告另一個標記為架構封裝之封裝的相依性。

元素階層

<套件>
<相依性>
<PackageDependency>

語法

<PackageDependency 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|Description|PostalCode|POBox|Phone|X21Address|dnQualifier|(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|Description|PostalCode|POBox|Phone|X21Address|dnQualifier|(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.

                   MinVersion? = A version string in quad notation, "Major.Minor.Build.Revision". />

答案

? 選擇性 (零或一)

屬性和項目

屬性

屬性 描述 資料類型 必要 預設值
MinVersion

相依性套件的最小版本。

四個標記法中的版本字串: No
名稱

出現在相依性封裝之Identity元素的name屬性中的名稱。

長度介於3到50個字元之間的字串,由英數位元、句號和虛線字元所組成。 Yes
發行者

發行者出現在相依性封裝的Identity元素的Publisher屬性中。

介於1到8192個字元之間的字串,長度符合辨別名稱的正則運算式: " (CN |L | O |OU |E |C | S |街道 |T |G |I | SN |DC | SERIALNUMBER |描述 |郵遞區號 |POBox |電話 |X21Address | dnQualifier | (OID\. (0 |[1-9][0-9] * ) ( \. (0 |[1-9][0-9] * ) ) +) ) = ( ( [^,+ = " <> #;]) + |」。* ") (, ( (CN |L | O |OU |E |C | S |街道 |T |G |I | SN |DC | SERIALNUMBER |描述 |郵遞區號 |POBox |電話 |X21Address | dnQualifier | (OID\. (0 |[1-9][0-9] * ) ( \. (0 |[1-9][0-9] * ) ) +) ) = ( ( [^,+ = " <> #;]) + |」。* ") ) ) *"。 此外,語意驗證可確保字串符合 CertNameToStr Windows API 實作為500規則的規範。 No

 

子元素

無。

父項目

Parent 項目 描述
Dependencies (相依性)

宣告封裝相依的其他封裝以完成其軟體。

 

備註

使用套件相依性時,請注意下列事項:

  • 封裝不能有多個具有相同 名稱 屬性的相依性宣告。
  • 如果未指定Publisher屬性,則相依性套件必須為不帶正負號。 當相依性套件未簽署時,它也必須標示為架構套件。 請參閱 架構 元素。
  • 相依性套件的版本必須大於或等於這個屬性所指定的最小版本。

範例

<Dependencies>
    <PackageDependency Name="Microsoft.WinJS.1.0"
      Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
      MinVersion="1.0.0.0"/>    
</Dependencies>

需求

Namespace http://schemas.microsoft.com/appx/2010/manifest