> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ModFolder 元素 (MicrosoftGame.config)

> MicrosoftGame.config 元素 - ModFolder (已淘汰)

# MicrosoftGame.config 元素 - ModFolder (已淘汰)

定義遊戲檔案的使用者模組位置。

## 父系

此元素的父系是 DesktopRegistration 元素。

## 需求

此元素為選用，不需要設定。

## 平台

此元素僅適用於 PC 裝置。

## 行為

* 屬性為 Name。
* Name 屬性的預設值為 `<PackageName>_Mods`。
* Name 屬性允許的值為位於套件根目錄的任何有效資料夾名稱。

## 備註

* 自 2022 年 3 月 GDK 起，由於套件安裝方式的變更，此元素現已淘汰。如需詳細資訊，請參閱[一般檔案安裝概觀](https://docs.xbox.com/zh-TW/build/core-features/common/packaging/packaging-flatfileinstall.md)。
* 若在您的 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 版本詳細資料](https://docs.xbox.com/zh-TW/reference/system/microsoftgameconfig/microsoftgameconfig-schema.md#MicrosoftGameConfig-VersionDetails)。

## 另請參閱

[MicrosoftGame.config 參考 - 目錄](https://docs.xbox.com/zh-TW/reference/system/microsoftgameconfig/elements/gc-microsoftgameconfig-toc.md)


## Related topics

- [MicrosoftGame.config 元素參考 (內容)](https://docs.xbox.com/zh-TW/reference/system/microsoftgameconfig/elements/gc-microsoftgameconfig-toc.md)
- [DesktopRegistration 元素 (MicrosoftGame.config)](https://docs.xbox.com/zh-TW/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-desktopregistration.md)
- [DisableFilesystemWriteVirtualization 元素 (MicrosoftGame.config)](https://docs.xbox.com/zh-TW/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-disablefilesystemwritevirtualization.md)
- [DisableRegistryWriteVirtualization 元素 (MicrosoftGame.config)](https://docs.xbox.com/zh-TW/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-disableregistrywritevirtualization.md)
- [EnableWritesToPackageRoot 元素 (MicrosoftGame.config)。](https://docs.xbox.com/zh-TW/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-enablewritestopackageroot.md)
