How do I install Windows 10 SDK for use with Visual Studio 2017

I can't figure out how to install Windows 10 SDK for Visual Studio 2017.

I downloaded and ran the Windows 10 SDK installer, and it displays Please find winsdksetup.exe in ....\Windows kits\10\WindowsSDK to install Windows Software Development Kit - Windows 10.0.17134.12.

When I run winsdksetup.exe, it takes me through the same loop, where it downloads a bunch of executable installers into this directory and show the same exact message.

When I try to build a DirectX project in VS2017, I get the error:

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".    

Do I need to install one of those installers? Which one do I need to run to build and debug DirectX projects for Visual Studio? Specifically to use VS2017 shader debugging functionality.

Thanks,

EDIT: Under VS2017 - Tools -> Get Tools and Features I have checked

Game Development with C++

and under Optional I have

C++ Profiling tools Windows 10 SDK (10.0.17134.0)

I'm downloading 16299.0, this fixed the first error of not having the right SDK.

But now I get the runtime error Failed Creating the Direct3D device when running in Debug. I can still run samples in Release


Solution 1:

The error message shows which SDK you need:

The Windows SDK version 10.0.16299.0 was not found

So the SDK for Windows 10 Fall Creators Update 1709 is missing and you downloaded the SDK for April 2018 Update (1803 Build 17134).

Run Visual Studio 2017 installer (C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe), click on modify, and select 16299 SDK under SDK/framework in individual components tab of the installer:

enter image description here