How to get installed Windows SDK version?
On English locale at least:
dir "%ProgramFiles%\Microsoft SDKs\Windows"
should work. It is quite likely that there will be multiple versions installed, which is the right one for an one build can only be specified by that project.
How do I install Windows 10 SDK for use with Visual Studio 2017
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:
Visual Studio can't find Installed version of SDK(10.0.17763.0) for a solution
First, you could check whether the solution platform settings are consistent. For example, both are x64:
Second, you could set the SDK version in
Properties->General. Then, check whether there is
If you still don't have this version, you can try to find
Desktop development with C++, uncheck the check box in the upper left corner, and check it again. Then modify VS and
Retarget Solution angin.
Also, you could download the Windows SDK 10.0.17763.0 directly.
How to fix the error Windows SDK version 8.1 was not found?
I faced this problem too. Re-ran the Visual Studio 2017 Installer, go to 'Individual Components' and select
Windows 8.1 SDK. Go back to to the project > Right click and Re-target to match the SDK required as shown below:
Installing the Windows SDK 8.1 version in Azure Pipelines
I used choco in order to get the Windows 8.1 SDK:
- task: PowerShell@2
displayName: 'Install the win 8.1 SDK'
choco install windows-sdk-8.1
Windows SDK Version setting in Visual Studio 2017
Generally speaking, a Windows SDK supports its "main" version and also the previous ones, but you need to specify what Windows version your program will need. In fact, you're better off doing so or else you can inadvertently use features not available in the version you want to support.
Given an SDK, you indicate which older Windows version to target by defining the WINVER and _WIN32_WINNT macros somewhere in your project files or in the C/C++ Preprocessor project settings in Visual Studio.
For example, the following definitions target Windows 7:
#define WINVER 0x0601
#define _WIN32_WINNT 0x0601
For more information, see Using the Windows Headers and Modifying WINVER and _WIN32_WINNT
Is it possible to control the Windows SDK version in Windows Kits?
As pointed out by @Richard Critten in the comments of the question, the Windows 10 SDK options are configurable, and installable through the Visual Studio Installer.
As shown below, there are many different options for SDK installation
It would be sensible to pick one that works for your development environment & team, and ensure every developer has that option installed for their own Visual Studio environment.