> ## 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 - ModFolder (DEPRECATED)

> MicrosoftGame.config Element - ModFolder (DEPRECATED)

# MicrosoftGame.config Element - ModFolder (DEPRECATED)

定义你的游戏文件的最终用户 mod 位置。

## 父元素

此元素的父元素是 DesktopRegistration 元素。

## 要求

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

## 平台

此元素仅适用于 PC 设备。

## 行为

* 属性为 Name。
* Name 属性的默认值为 `<PackageName>_Mods`。
* Name 属性的允许值是位于包根目录的任何有效文件夹名称。

## 备注

* 自 2022 年 3 月 GDK 起，由于包安装方式的变更，此元素现已弃用。有关详细信息，请参阅[平面文件安装概述](/build/core-features/common/packaging/packaging-flatfileinstall)。
* 如果在你的 MicrosoftGame.config 中设置了此元素，在 2022 年 3 月的 Microsoft Game Development Kit (GDK) 及未来版本中，此元素将被忽略。
* 如果这些元素出现在已更新为 `Game configVersion="1"` 的 MicrosoftGame.config 中，尝试打包标题时将出现错误。错误信息将输出 "The DesktopRegistration entries "modFolder", "enableWritesToPackageRoot", "disableRegistryWriteVirtualization" and "disableFilesystemWriteVirtualization" are deprecated in configVersion >= 1"。从 MicrosoftGame.config 中删除这些元素将解决此问题。有关 `Game configVersion="1"` 及其是否影响你的标题的更多信息，请参阅 [MicrosoftGame.config 版本详细信息](/reference/system/microsoftgameconfig/microsoftgameconfig-schema#MicrosoftGameConfig-VersionDetails)。

## 另请参阅

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


## Related topics

- [MicrosoftGame.config Element - EnableWritesToPackageRoot (DEPRECATED)](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-enablewritestopackageroot.md)
- [MicrosoftGame.config Element - DisableFilesystemWriteVirtualization (DEPRECATED)](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-disablefilesystemwritevirtualization.md)
- [MicrosoftGame.config Element - DisableRegistryWriteVirtualization (DEPRECATED)](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-disableregistrywritevirtualization.md)
- [MicrosoftGame.config Element - DesktopRegistration](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-desktopregistration.md)
- [MicrosoftGame.config Element - Folder](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-folder.md)
