C++ – How to fix the error “Windows SDK version 8.1” was not found

cvisual studio

I recently updated visual studio 2015 and now, when i try to build any project it always fails and i get the error

Severity Code Description Project File Line Suppression State
Error MSB8036 The Windows SDK version 8.1 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". Proj D:\Program Files (x86)\visual studio
2017\Common7\IDE\VC\VCTargets\Platforms\Win32\PlatformToolsets\v141\Toolset.targets 34

I retargeted the solution as it said, and the problem persisted, even though the retargetting was completed.I decided to install visual studio 2017 because of this, and, lo and behold, it did the exact same thing.I'm also using windows 7.

What is the problem and how can i fix it?

Best Answer

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:enter image description here