首页 > 解决方案 > 如何安装 Windows 10 SDK 以用于 Visual Studio 2017

问题描述

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

我下载并运行了 Windows 10 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在 Debug 中运行时出现运行时错误。我仍然可以在 Release 中运行示例

标签: c++visual-studio-2017windows-10directx

解决方案


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

未找到 Windows SDK 版本 10.0.16299.0

因此,缺少适用于 Windows 10 Fall Creators Update 1709 的 SDK,您下载了适用于 2018 年 4 月更新(1803 Build 17134)的 SDK。

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

在此处输入图像描述


推荐阅读