> ## 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 遊戲識別碼，用於 XBOX Live 服務的識別。自 2022 年 3 月 GDK 起，如果指定了 MSAAppId 元素，新遊戲就必須提供遊戲識別碼。此需求是透過 MicrosoftGame.config 結構描述版本更新 (從 configVersion 0 更新為 configVersion 1) 強制執行，僅適用於使用 2022 年 3 月 GDK 及更新版本建立的新遊戲。

## 父系

此元素的父系是 Game 元素。

## 需求

此元素為選擇性，不需要設定。
如果 MicrosoftGame.config 中的 configVersion = 1，則在下列情況下必須設定此元素:

* 已指定 MSAAppId 元素。
* 已指定 NoCodePCRoot 元素。
* AdvancedUserModel 元素設定為 false 值。

## 平台

此元素適用於 PC 和主機。

## 行為

* 沒有屬性。
* 沒有預設值。
* 允許的值為 8 個十六進位字元。

## 備註

* TitleId 元素是從 Partner Center 產生的遊戲識別。您可以在 Partner Center 專案的 [\[遊戲設定\] -> \[識別詳細資料\]](/zh-TW/services/xbox-services/fundamentals/portal-config/live-setup-partner-center-partners) 中找到。
* MicrosoftGame.config 中的 TitleId 元素必須與 Partner Center 中的值相符。[MicrosoftGame.config 編輯器](/zh-TW/build/core-features/common/game-config/MicrosoftGameConfig-Editor)提供名為「市集關聯精靈」的工具，可自動將 TitleId (及其他識別碼值) 的本機 .config 值與 Partner Center 中您產品的現有值同步。
* Visual Studio 新專案範本會為此元素提供預設值 'FFFFFFFF'。此值可讓您在初期反覆開發時編譯遊戲，而不必立即從 Partner Center 取得識別碼。強烈建議您在遊戲可以建置後立即變更此識別碼，以避免嘗試呼叫 API 時發生失敗。

## 另請參閱

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


## Related topics

- [MicrosoftGame.config 元素 - TitleId](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-titleid.md)
- [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 Element - TitleId](/ko/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-titleid.md)
- [MicrosoftGame.config 要素 - TitleId](/ja-jp/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-titleid.md)
