> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MicrosoftGame.config 元素 - Dependency

> MicrosoftGame.config 元素 - Dependency

# MicrosoftGame.config 元素 - Dependency

必須在遊戲之前安裝的特定架構套件和版本。必須設定 name 和 MinVersion 屬性規格。

## 父系

此元素的父系是 DependencyList 元素。

## 需求

此元素為選擇性，不需要設定。

## 平台

此元素僅適用於 PC 裝置。

## 行為

* 屬性為 Name 和 MinVersion。
* 沒有預設值。
* 允許的值為 Name 和 MinVersion 屬性。

## 備註

* Name 屬性是相依性的套件名稱。應為長度介於 3 到 50 個字元之間的 ASCII 字串。
* MinVersion 屬性是由四個部分組成的版本號碼 (例如 11.0.61135.0)。

### Dependency 與 KnownDependency 元素之間的差異。

KnownDependency 元素旨在提供更簡單的方式來指定常見的相依性。如需允許值的清單，請參閱結構描述。KnownDependency 元素預設也會使用最低版本，因此不需要設定最低版本。

Dependency 元素除了需要設定最低版本外，還需要指定架構套件的完整身分識別名稱。

建議您對已指定的常見相依性使用 KnownDependency，只有在您想要更精細地控制特定架構套件或架構套件版本時，才使用 Dependency。

## 另請參閱

[MicrosoftGame.config 參考 - 目錄](/zh-TW/reference/system/microsoftgameconfig/elements/gc-microsoftgameconfig-toc)


## Related topics

- [MicrosoftGame.config Element - Dependency](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-dependency.md)
- [MicrosoftGame.config Element - DependencyList](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-dependencylist.md)
- [MicrosoftGame.config Element - KnownDependency](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-knowndependency.md)
- [MicrosoftGame.config Element - MainPackageDependency](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-mainpackagedependency.md)
- [MicrosoftGame.config 参考](/zh-CN/reference/system/microsoftgameconfig/elements/gc-microsoftgameconfig-toc.md)
