> ## 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 元素 - TitleId

> MicrosoftGame.config 元素 - TitleId

# MicrosoftGame.config 元素 - TitleId

指定该游戏的 XBOX Live Title ID，用于在 XBOX Live 服务中作为身份标识。自 2022 年 3 月 GDK 起，如果指定了 MSAAppId 元素，则新游戏必须提供 Title Id。此要求由 MicrosoftGame.config 架构版本更新（从 configVersion 0 到 configVersion 1）强制执行，仅适用于使用 2022 年 3 月 GDK 及更高版本创建的新游戏。

## 父元素

此元素的父元素为 Game 元素。

## 要求

此元素为可选项，不要求必须设置。
如果 MicrosoftGame.config 中 configVersion = 1，则在以下情况下必须设置此元素：

* 指定了 MSAAppId 元素。
* 指定了 NoCodePCRoot 元素。
* AdvancedUserModel 元素被设置为 false。

## 平台

此元素适用于 PC 和主机。

## 行为

* 无属性。
* 无默认值。
* 允许值为 8 个十六进制字符。

## 备注

* TitleId 元素是从合作伙伴中心生成的游戏标识。可在合作伙伴中心项目的 [Game Setup -> Identity 详细信息](/services/xbox-services/fundamentals/portal-config/live-setup-partner-center-partners)中找到。
* MicrosoftGame.config 中的 TitleId 元素必须与合作伙伴中心中的值匹配。[MicrosoftGame.config 编辑器](/build/core-features/common/game-config/MicrosoftGameConfig-Editor)提供了一个名为 Store Association Wizard 的工具，可自动将本地 .config 中的 TitleId（以及其他 ID 值）与合作伙伴中心中该产品的现有值同步。
* Visual Studio 新建项目模板会为此元素提供默认值 'FFFFFFFF'。此值允许早期迭代阶段编译游戏，而不必立即从合作伙伴中心获取 ID。强烈建议一旦游戏能够构建，就立即更改此 ID，以避免尝试进行 API 调用时出现失败。

## 另请参阅

[MicrosoftGame.config 参考 - 目录](/reference/system/microsoftgameconfig/elements/gc-microsoftgameconfig-toc)


## Related topics

- [MicrosoftGame.config 元素 - AdvancedUserModel](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-advancedusermodel.md)
- [MicrosoftGame.config Element - MSAAppId](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-msaappid.md)
- [MicrosoftGame.config 元素 - StoreId](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-storeid.md)
- [MicrosoftGame.config 元素 - XboxAnacondaTitleMemory](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-xboxanacondatitlememory.md)
- [MicrosoftGame.config 元素 - XboxLockhartTitleMemory](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-xboxlockharttitlememory.md)
