How to fix the error "Windows SDK version 8.1" was not found?

181,129

Solution 1

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

Solution 2

I installed the 8.1 SDK's version:

https://developer.microsoft.com/en-us/windows/downloads/sdk-archive

It used 1GB (a little more) in the installation.


Update October, 9 (2020). There's a https error: the sdksetup link is https://go.microsoft.com/fwlink/p/?LinkId=323507

"Save link as" should help.

Solution 3

Another way (worked for 2015) is open "Install/remove programs" (Apps & features), find Visual Studio, select Modify. In opened window, press Modify, check

  • Languages -> Visual C++ -> Common tools for Visual C++
  • Windows and web development -> Tools for universal windows apps -> Tools (1.4.1) and Windows 10 SDK ([version])
  • Windows and web development -> Tools for universal windows apps -> Windows 10 SDK ([version])

and install. Then right click on solution -> Re-target and it will compile

Solution 4

I had win10 SDK and I only had to do retarget and then I stopped getting this error. The idea was that the project needs to upgrade its target Windows SDK.

Solution 5

I realize this post is a few years old, but I just wanted to extend this to anyone still struggling through this issue.

The company I work for still uses VS2015 so in turn I still use VS2015. I recently started working on a RPC application using C++ and found the need to download the Win32 Templates. Like many others I was having this "SDK 8.1 was not found" issue. i took the following corrective actions with no luck.

  • I found the SDK through Micrsoft at the following link https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/ as referenced above and downloaded it.
  • I located my VS2015 install in Apps & Features and ran the repair.
  • I completely uninstalled my VS2015 and reinstalled it.
  • I attempted to manually point my console app "Executable" and "Include" directories to the C:\Program Files (x86)\Microsoft SDKs\Windows Kits\8.1 and C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools.

None of the attempts above corrected the issue for me...

I then found this article on social MSDN https://social.msdn.microsoft.com/Forums/office/en-US/5287c51b-46d0-4a79-baad-ddde36af4885/visual-studio-cant-find-windows-81-sdk-when-trying-to-build-vs2015?forum=visualstudiogeneral

Finally what resolved the issue for me was:

  • Uninstalling and reinstalling VS2015.
  • Locating my installed "Windows Software Development Kit for Windows 8.1" and running the repair.
  • Checked my "C:\Program Files (x86)\Microsoft SDKs\Windows Kits\8.1" to verify the "DesignTime" folder was in fact there.
  • Opened VS created a Win32 Console application and comiled with no errors or issues

I hope this saves anyone else from almost 3 full days of frustration and loss of productivity.

Share:
181,129
no one
Author by

no one

Updated on December 07, 2021

Comments

  • no one
    no one over 2 years

    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?

    • Bo Persson
      Bo Persson about 7 years
      Rerun the install and verify that the specific SDK is selected. It might not be by default. If it is already selected, try the Repair option instead.
    • no one
      no one about 7 years
      i tried the repair and it sadly didnt work.Also, in the install, i dont have any options for a sdk
  • BSalita
    BSalita over 6 years
    Right. You have to install 8.1 SDK before you can change it.
  • Maverick
    Maverick about 6 years
    Sdk8.1 is included inside vs2017. I selected it from the vs2017 installer but i am still getting the same error. Retargeting is done without errors. What seèms to be wrong here?
  • mwfearnley
    mwfearnley about 5 years
    Based on your screenshot there, you have a version of the Windows 10 SDK already installed. This SDK supports Windows 7 SP1 and later, so unless you have a specific need for the 8.1 SDK, you should probably just stick with what you have.
  • Perfect28
    Perfect28 about 4 years
    this is the correct answer for VS 2019 users as Windows 8.1 SDK doest no longer exist in vs installer
  • CAD bloke
    CAD bloke about 4 years
    If you are going to downvote at least say why - this worked on my machine.
  • CAJE
    CAJE over 3 years
    @AAEM weirdly didn't download on Chome for me, but worked in Firefox
  • hestellezg
    hestellezg over 3 years
    There's a https error. The url for the sdksetup is go.microsoft.com/fwlink/p/?LinkId=323507
  • eri0o
    eri0o about 3 years
    vs2015 build tools installer is no longer available due to sha-1 deprecation.
  • Decagrog
    Decagrog over 2 years
    So that you...?
  • pooshla
    pooshla over 2 years
    haha, not sure what happened there ;)
  • E_Ri
    E_Ri over 2 years
    Interesting option. Another route that I personally prefer is you can override these parameters at build time. Ex: msbuild xx.csproj/xx.sln /t:build /p:WindowsTargetPlatformVersion=xx;WindowsTargetPlatformMinV‌​ersion=xx (source: stackoverflow.com/a/58489661/146698)
  • Ace Frahm
    Ace Frahm about 2 years
    For me in Visual Studio 2019, I had to right-click each project, open the properties for each one. Under "Configuration Properties" » "General" » "Platform Toolset" I was able to change the target version.