Reputation: 147
my Visual Studio does not recognize my Windows 10 SDK.
The steps to reproduce it:
- Install VS 2015 Professional with update 3 and select the windows SDK for version 10.0.14393.0 as optional feature
- Create an UWP App with this version
- The following error is displayed in the output window: error : The project requires a platform SDK (UAP, Version=10.0.14393.0) that is not installed. Please visit the following link for more information: http://go.microsoft.com/fwlink/?prd=12514&pver=14.0&sbp=PlatformSDKMissing&plcid=0x409&o1=UAP,%20Version=10.0.14393.0
- Uninstall Windows 10 SDK 10.0.14393.0
- Install Windows 10 SDK 10.0.14393.0 from the link provided in step 3
- Create an UWP App with the version 10.0.14393.0 and the same error like in step 3 is displayed
further information: in the list of programs and features in the control panel the name of the sdk is: Windows Software Development Kit - Windows 10.0.14393.795 and the version is 10.1.14393.795
My guess is that the version is wrong in the registry and therefore visual studio cannot find the sdk.
If I look under the path C:\Program Files (x86)\Windows Kits\10\Platforms\UAP I can see a directory named 10.0.14393.0 that contains a Platform.xml and a PreviousPlatforms.xml as it should. Under the path C:\Program Files (x86)\Windows Kits\10\bin there is a directory named 10.0.14393.0 too so the SDK seems to be installed correctly
I already tried reinstalling of visual studio and several SKDs in different versions from VS or the online link and nothing worked. If I target another SDK Version like 10.0.10586 I am able to create the project.
Thank you for reading. I am thankful for every hint into the right direction.
Upvotes: 10
Views: 16954
Reputation: 36
If somebody still has the same issue today I like to write a short clarification here as this seems to still be the most recent post to this problem.
Today there is more than one SDK that can be used with UDP. Therefore you may have missed to install the right one, when you installed the UDP Workload on Visual Studio as the SDK is now also an optional component. (Visual Studio Installer -> Workloads -> Universal Windows... -> right side: Installation Details -> Optional -> Windows XX SDK ([Version]))
It is important that you install the SDK Version of the Target-Version in your Publish-Projekt, that also equals the Version-Number in the error message.
I know it seems all logical in hind side, but I wanted to leave a note for those who still struggle with it as I did after I reinstalled the project after a few years.
Upvotes: 0
Reputation: 55
Hello, I had not the same but a similar problem:
When building a project (doesn't matter which one), there were a lot of errors connected with SDK files, for example, crtdbg.h
. It happened after installing new VS Preview version, and appeared in both new and old versions (I didn't delete stable version) in any project.
It could be fixed for a certain project by adding both
"C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt"
and
"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.20348.0\ucrt\x64"
directories to
Project/Properties/Linker/General/Additional_Library_Directories
or to
Project/Properties/VC++_Directories/Library_Directories
before other variables like this:
"you path to libs";$(other VS variables)$(one more variable)
In the library name here:
And they should be replaced by your own parameters.
But there's also a proper solution:
I deleted all SDK packages from my Visual_Studio/2019/Community folder and anywhere I could find it (but don't delete non Visual Studio SDK packages) then installed only one SDK package instead of them all using Visual Studio Installer and its option to Modify your VS build as in Christopher Huebner's answer. And it worked fine. There also was a problem that you cannot add the common directory to your Library_Directories path, you need to choose a proper version, and the versions should be similar in all Project/Properties/Windows_SDK_version, Windows Kits Lib folder, and Windows Kits Include folder.
Otherwise it will not work. That's why it is such a headache to configure SDK properly.
It would be probably enough to only delete them in Include and Lib folders mentioned above, try it first.
And the common advice I would give with SDK problems is:
Don't install several SDK versions via Visual Studio Installer, choose only one.
Upvotes: 0
Reputation: 121
Reinstalling Windows is not necessary. Modify the existing installation of VS2017 and remove the check next to Universal Windows Platform development, then go to the Individual components tab and select the Windows SDK 10.0.14393.
Click Modify.
Once finished, Modify the existing installation of VS2017 again and recheck the Universal Windows Platform development box and Click Modify.
Problem resolved and no restart required.
Upvotes: 12
Reputation: 97
I had this same issue but resolved it by installing the .033 version rather than the latest .795. It is available on the SDK download page in the description of the SDK by clicking on the link behind 'QFE':
Windows 10 SDK (ver. 10.0.14393.795 – a QFE for 10.01.14393.033) and Microsoft Emulator for Windows 10 mobile
Also, even though it wasn't required, I uninstalled .795, then rebooted. Then installed .033 and then rebooted again prior to trying to open visual studio.
Upvotes: 1
Reputation: 147
The solution is to reinstall windows and make a clean install of Visual Studio. Somehow the system got messed up and not even a visual studio reinstall could help.
Upvotes: 0
Reputation: 8611
I'v already installed Windows SDK 10.0.14393.795 successfully. Then I create UWP project which targets 14393 successfully. So I could not reproduce your issue.
I already tried reinstalling of visual studio and several SKDs in different versions from VS or the online link and nothing worked.
If you have tried to repair your visual studio, but it still didn't work. You'd better use http://aka.ms/vscollect to gather the installation logs. Find vslogs.zip from %temp% folder. Please upload the file and share the link here. I will help you find the root cause according to the log file.
Upvotes: 0