Some time ago, some netizens encountered a strange problem, saying that he was on the machine
C++Engineering report error. At that time, I had two doubts
1. The project setting is wrong.
vs2019It’s not installed.
Since the simplest project is created, the compiler will report the same error, so the problem of project settings can be ruled out. That can only be
vs2019That’s the problem. But where is the problem?
According to the error prompt, he found the following link:
According to the tips in the link, I tried and failed to solve the problem. Later, in the process of our communication, he solved the problem himself. Isn’t this the famous rubber duck debugging method? When his problem was solved, I specially reproduced the whole process locally, did some investigation, collated the cost paper and shared it with you.
I use it
vs2019The simplest NEW
Hello worldProject, compile and error report are as follows:
Error MSB8037 The Windows SDK version 10.0.18362.0 for Desktop C++ x86 Apps 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”.
A more intuitive screenshot of error reporting is as follows:
Since the prompt cannot find the corresponding version of
SDKThen go to the project properties to see the corresponding configuration. In engineering,
Right click ->
attribute。 In the project properties dialog box, select
Configuration PropertiesUnder the
General。 View on the right
Windows SDK VersionIs the value of
10.0.18362.0As shown in the figure below.
Project SDK version configuration
Do a local search
10.0.18362.0To see if there is a related path locally.
Everything search results
There are also related paths locally. Whatever you can think of and doubt is ruled out. Let’s invite our old friends——
process monitor 。
In depth investigation
process monitor, turn on monitoring, and
vsAfter the problem occurs, stop monitoring.
The next step is the most important step – filtering.
process monitorThe key to solve the problem quickly is to filter out the events related to the problem!
What conditions do we need to filter?
The general result is that successful events do not help us much, so filter them out first
Since the hint is not found
SDKThe error should be associated with
10.0.18362.0Relevant, so only keep it
Unexpectedly, the effect is so good, only six.
Two of them are not found in the registry
HKLM\Software\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0.18362.0(this registry key does not have to exist and may not be found on a machine that can compile normally). The last one is that the file cannot be found
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\sdkddkver.h。 It seems that I am missing this document locally. Because I intentionally renamed this file, changed it back, recompiled it, and finished.
Please refer to the screen video below for the detailed investigation process.
Postscript to troubleshooting-missing-sdk-10.0.18362.0-screen-record
The whole process of communicating with this netizen is very smooth and easy. He has searched for relevant information on the Internet according to the clues, and has explored it himself. If you suspect that there is a problem, you can immediately check the relevant configuration for troubleshooting. Finally, in the process of communication, he solved the problem himself. It turns out that he changed the location of some documents a few days ago. It would be nice to change them back. After chatting, I learned that he was only a sophomore!
This is the introduction of this article about how to help vs2019 recover the lost SDK. For more information about retrieving the lost SDK for vs2019, please search the previous articles of developeppaer or continue to browse the related articles below. I hope you can support developeppaer more in the future!