Help vs2019 recover the lost SDK



Some time ago, some netizens encountered a strange problem, saying that he was on the machinevs2019compileC++Engineering report error. At that time, I had two doubts

1. The project setting is wrong.

2.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 bevs2019That’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.

Compilation blocked

I use itvs2019The simplest NEWHello 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 ofSDKThen go to the project properties to see the corresponding configuration. In engineering,Right click -> attribute。 In the project properties dialog box, selectConfiguration PropertiesUnder theGeneral。 View on the rightWindows SDK VersionIs the value of10.0.18362.0As shown in the figure below.


Project SDK version configuration

Do a local search10.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

openprocess monitor, turn on monitoring, andvsAfter the problem occurs, stop monitoring.

The next step is the most important step – filtering.

useprocess 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 firstResultyesSUCCESSThe event.

Since the hint is not found10.0.18362.0Version ofSDKThe error should be associated with10.0.18362.0Relevant, so only keep itPathContains10.0.18362.0Record of.

Unexpectedly, the effect is so good, only six.

Two of them are not found in the registryHKLM\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 foundC:\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!

Recommended Today

Yii2.0 framework to upload Excel files and import them into the database

In this paper, an example of yii2.0 framework to upload Excel files into the database after the method. The details are as follows: Model model <?php /** *Describe * @author zcy * @date 2019/8/13 */ namespace app\models; use yii\base\Model; use yii\db\ActiveRecord; use yii\web\UploadedFile; class uploadForm extends ActiveRecord { public $file; public function rules() { return […]