Reputation: 1362
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?
Upvotes: 125
Views: 233564
Reputation: 850
In my project the error was because of a reference to a not retargeted project. This reference could be invisible in the solution tree. So you can remove it by editing xml source of the project file.
<ProjectReference Include=
which points to any .vcxproj project file that is not needed in your project and remove it.Upvotes: 1
Reputation: 2450
I downloaded the sdksetup using
curl -L https://go.microsoft.com/fwlink/p/?LinkId=323507 --output sdksetup.exe
It gives the following /help
output
So it appears installing it with .\sdksetup /features + /q
should fix this
Upvotes: 0
Reputation: 12064
Open Visual Studio, and go to File -> New -> Project -> Visual C++, it will allow you install Windows 8.1 SDK with the first option.
Upvotes: 0
Reputation: 1394
PROBLEM: I ONLY get this compile-time "Windows SDK version 8.1 not found" error ( and a few other very-hard-to-resolve-nuisance errors -- cannot list them all ) when I export a project from an old version of MS Visual Studio (VS) to the new MS VS (2017), using the new MS VS export/"One-way Upgrade" feature.
SOLUTION: I have since learned to not use this export/upgrade feature and instead just create the new project from scratch -- using all my old source files, of course. Only my project settings have to be rebuilt, to be clear.
This is a bit of a pain, and a shame the export/upgrade feature won't work properly like it used to, but this is is actually easier and faster in the long run. MUCH better than working through a list of spurious errors that really should not have arisen in the first place.
Hope this helps...
Upvotes: 0
Reputation: 3711
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.
Upvotes: 55
Reputation: 552
I encountered this issue while trying to build an npm project. It was failing to install a node-sass package and this was the error it was printing. I solved it by setting my npm proxy correctly so that it could reach the npm repo
Upvotes: 0
Reputation: 61
For me in the Project Properties Settings General->Target Platform -> Change Windows 8.1 to Windows 10 solved the issue
Upvotes: 2
Reputation: 8828
Grep the folder tree's *.vcxproj
files. Replace <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
with <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
or whatever SDK version you get when you update one of the projects.
Upvotes: 1
Reputation: 191
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.
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:
I hope this saves anyone else from almost 3 full days of frustration and loss of productivity.
Upvotes: 5
Reputation: 2973
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"
If you do visual studio guide, you will resolve the problem.
Upvotes: 1
Reputation: 5876
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
Upvotes: 10
Reputation: 766
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.
Upvotes: 5
Reputation: 11941
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:
Upvotes: 159