Skip to main content

MicrosoftGame.config 元素 - EnableWritesToPackageRoot (已淘汰)

如果您的遊戲需要寫入套件安裝位置,請設定為 true。

父系

此元素的父系是 DesktopRegistration 元素。

需求

此元素為選擇性,不需要設定。

平台

此元素僅適用於 PC 裝置。

行為

  • 沒有屬性。
  • 預設值為 false。
  • 允許的值為 true 或 false。

備註

  • 自 2022 年 3 月的 Microsoft Game Development Kit (GDK) 起,由於套件安裝方式的變更,此元素現已淘汰。如需詳細資訊,請參閱平面檔案安裝概觀。
  • 如果在您的 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 版本詳細資料。

另請參閱

MicrosoftGame.config 參考 - 目錄
Last modified on October 6, 2026