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

> MicrosoftGame.config Element - NoCodePCRoot

# MicrosoftGame.config Element - NoCodePCRoot

指定使用[将旧版标题移植到 PC 游戏存档并支持无代码云存档](/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` 值。"已保存的游戏" 文件夹 (`%USERPROFILE%\Saved Games`) 对应于 `FOLDERID_SavedGames`。OneDrive 默认不会同步此文件夹。此行为有助于避免与云存档同步发生冲突。OneDrive 自动同步可能影响其他位置，例如 AppData。

<Info>`NoCodePCRoot` 重定向仅在你通过 `wdapp install` 以打包构建方式启动标题时有效。直接启动 .exe 会绕过重定向，直接读写到物理 `NoCodePCRoot` 路径，而不会进行云同步。在打包启动和直接 .exe 启动之间切换可能会导致存档数据看起来丢失。有关详细信息，请参阅[将旧版标题移植到 PC 游戏存档并支持无代码云存档](/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 参考 - 目录](/reference/system/microsoftgameconfig/elements/gc-microsoftgameconfig-toc)

[将旧版标题移植到 PC 游戏存档并支持无代码云存档](/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 - MSAAppId](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-msaappid.md)
- [MicrosoftGame.config Element - EnableWritesToPackageRoot (DEPRECATED)](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-enablewritestopackageroot.md)
- [MicrosoftGame.config Element - DesktopRegistration](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-desktopregistration.md)
- [MicrosoftGame.config Element - ModFolder (DEPRECATED)](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-modfolder.md)
- [MicrosoftGame.config Element - DisableFilesystemWriteVirtualization (DEPRECATED)](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-disablefilesystemwritevirtualization.md)
