Skip to main content
Microsoft Game Development Kit (GDK) 提供了多种命令提示符。它们用于为每个受支持的平台(XBOX One、XBOX Scarlett 或 Desktop)和 Visual Studio 配置(Visual Studio 2019 或 Visual Studio 2022)正确设置开发者环境变量。命令提示符快捷方式位于“开始”菜单的 Microsoft GDK 文件夹中,或 GDK 安装位置下的 Command Prompts 文件夹中(即 C:\Program Files (x86)\Microsoft GDK\Command Prompts)。命令提示符如下所示。
  • (Month Year) Desktop VS 2019 Gaming Command Prompt: 使用指定的 GamingDesktopVS2019 参数调用 GamingDesktopVars.cmd 文件
  • (Month Year) Desktop VS 2022 Gaming Command Prompt: 使用指定的 GamingDesktopVS2022 参数调用 GamingDesktopVars.cmd 文件
  • (Month Year) XBOX One VS 2019 Gaming Command Prompt: 使用指定的 GamingXboxVS2019 and (GXDKEDITION) 参数调用 GamingXboxVars.cmd 文件
  • (Month Year) XBOX One VS 2022 Gaming Command Prompt: 使用指定的 GamingXboxVS2022 and (GXDKEDITION) 参数调用 GamingXboxVars.cmd 文件
  • (Month Year) XBOX Scarlett VS 2019 Gaming Command Prompt: 使用指定的 GamingXboxScarlettVS2019(GXDKEDITION) 参数调用 GamingXboxVars.cmd 文件
  • (Month Year) XBOX Scarlett VS 2012 Gaming Command Prompt: 使用指定的 GamingXboxScarlettVS2022(GXDKEDITION) 参数调用 GamingXboxVars.cmd 文件
GamingDesktopVars.cmdGamingXboxVars.cmd 也位于 Command Prompts 文件夹中。请确保使用与你游戏支持的平台和开发期间的 Visual Studio 配置相对应的命令提示符快捷方式,以便设置正确的开发者环境。 有关如何从 GDK 的解压平铺部署中配置 GDK 命令提示符和开发环境的更多信息,请参阅无需安装 Microsoft Game Development Kit 即可配置构建环境
最后修改于 2026年8月24日