> ## 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 Element - KnownDependency

> MicrosoftGame.config Element - KnownDependency

# MicrosoftGame.config Element - KnownDependency

用于指定常用框架包之一的快捷方式。必须指定 Name 属性，MinVersion 会自动设置。请参阅以下架构中的 ST\_KnownDependency 部分以获取可能的快捷方式列表。

## 父元素

此元素的父元素是 DependencyList 元素。

## 要求

此元素为可选，无需设置。

## 平台

此元素仅适用于 PC 设备。

## 行为

* 无属性。
* 无默认值。
* 允许值为 DX11（用于 DirectX 运行时依赖项）、VC11（用于 Visual Studio 2012 的 Visual Studio C++ 运行时）、VC12（用于 Visual Studio 2013 的 Visual Studio C++ 运行时）和 VC14（用于 Visual Studio 2015、2017、2019 和 2022 的 Visual Studio C++ 运行时）。

## 备注

### Dependency 与 KnownDependency 元素之间的区别。

KnownDependency 元素旨在提供一种更简单的方式来指定常见依赖项。请参阅架构了解允许值的列表。KnownDependency 元素还默认使用最低版本，无需进行设置。

Dependency 元素除了要求设置最低版本外，还需要指定框架包的完整标识名称。

我们建议对已指定的常见依赖项使用 KnownDependency，仅在你需要对特定框架包或框架包版本进行更精细控制时使用 Dependency。

## 另请参阅

[MicrosoftGame.config 参考 - 目录](/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 - MainPackageDependency](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-mainpackagedependency.md)
- [MicrosoftGame.config Element - DesktopRegistration](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-desktopregistration.md)
- [MicrosoftGame.config Element - Game](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-game.md)
