代码之家  ›  专栏  ›  技术社区  ›  Mich

如何安装用于Visual Studio 2017的Windows 10 SDK?

  •  27
  • Mich  · 技术社区  · 6 年前

    我不知道如何安装Windows 10 SDK for Visual Studio 2017。

    我下载并运行了Windows10 SDK安装程序,它显示 Please find winsdksetup.exe in ....\Windows kits\10\WindowsSDK to install Windows Software Development Kit - Windows 10.0.17134.12.

    当我跑步时 winsdksetup.exe ,它将带我经历相同的循环,在这个循环中,它将大量可执行安装程序下载到这个目录中,并显示相同的准确消息。

    当我尝试在VS2017中构建DirectX项目时,我得到了错误:

    MSB8036 The Windows SDK version 10.0.16299.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".    
    

    我需要安装其中一个安装程序吗?要为Visual Studio生成和调试DirectX项目,需要运行哪一个?专门用于使用VS2017明暗器调试功能。

    谢谢,

    编辑: 在VS2017-工具-获取工具和功能下 我查过了

    用C++开发游戏

    在可选项下我有

    C++剖析工具 Windows 10 SDK(10.0.17134.0)

    我正在下载16299.0,这修复了第一个没有正确的SDK的错误。

    但现在我得到了运行时错误 Failed Creating the Direct3D device 在调试中运行时。我仍然可以在发布时运行示例

    1 回复  |  直到 5 年前
        1
  •  44
  •   magicandre1981    6 年前

    错误消息显示您需要哪个SDK:

    找不到Windows SDK版本10.0.16299.0

    因此,缺少用于Windows10 Fall Creators更新1709的SDK,您下载了用于2018年4月更新(1803 Build17134)的SDK。

    运行Visual Studio 2017安装程序( C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe )点击 modify ,并在安装程序的各个组件选项卡的sdk/framework下选择16299 sdk:

    enter image description here