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

> MicrosoftGame.config 元素 - NoCodePCRoot

# MicrosoftGame.config 元素 - NoCodePCRoot

指定使用下列功能時儲存遊戲存檔的本機資料夾：
[使用無程式碼雲端存檔將先前的遊戲移植到 PC 遊戲存檔](/zh-TW/build/core-features/common/game-save/game-saves-walkthroughs-and-samples#porting-previous-titles-to-pc-game-saves-with-no-code-cloud-saves)

## 父系

父元素是 `SaveGameStorage` 元素。

## 需求

此元素為選用。

## 平台

此元素僅適用於 PC 裝置。

## 行為

* 屬性為 `RelativeTo`。
* `RelativeTo` 的屬性值為 `AppData`、`Public`、`LocalAppData`、`LocalAppDataLow`、`ProgramData`、`SavedGames` 或 `UserProfile`。
* 允許的值為相對檔案路徑。

## 備註

* 若要使用此元素，請在您的 `MicrosoftGame.config` 檔案中
  指定有效的 `TitleId` 和 `MSAAppId` 元素。
* 使用 `SavedGames` 作為 `RelativeTo` 值。Saved Games 資料夾 (`%USERPROFILE%\Saved Games`) 對應至 `FOLDERID_SavedGames`。OneDrive 預設不會同步此資料夾。此行為有助於避免與雲端存檔同步發生衝突。OneDrive 自動同步可能會影響其他位置，例如 AppData。

<Info>只有在使用 `wdapp install` 以封裝組建的形式啟動遊戲時，`NoCodePCRoot` 重新導向才會運作。直接啟動 .exe 會略過重新導向，並在不進行雲端同步的情況下讀取和寫入實體 `NoCodePCRoot` 路徑。交替使用封裝啟動和直接啟動 .exe，可能會導致存檔資料看似遺失。如需詳細資訊，請參閱[使用無程式碼雲端存檔將先前的遊戲移植到 PC 遊戲存檔](/zh-TW/build/core-features/common/game-save/game-saves-walkthroughs-and-samples#porting-previous-titles-to-pc-game-saves-with-no-code-cloud-saves)。</Info>

## 另請參閱

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

[使用無程式碼雲端存檔將先前的遊戲移植到 PC 遊戲存檔](/zh-TW/build/core-features/common/game-save/game-saves-walkthroughs-and-samples#porting-previous-titles-to-pc-game-saves-with-no-code-cloud-saves)


## Related topics

- [MicrosoftGame.config Element - NoCodePCRoot](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-nocodepcroot.md)
- [MicrosoftGame.config 要素 - NoCodePCRoot](/ja-jp/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-nocodepcroot.md)
- [MicrosoftGame.config 元素 - SaveGameStorage](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-savegamestorage.md)
- [Elemento de MicrosoftGame.config - NoCodePCRoot](/es/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-nocodepcroot.md)
- [MicrosoftGame.config 元素 - TitleId](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-titleid.md)
