Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft Visual Studio Community 2019: fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory

Just completed the fresh installation of Microsoft Visual Studio Community 2019 with no optional features, enter image description here tried running simple code with c++ console app project type:

#include <iostream>

using namespace std;

int main()
{
    cout << "testing vs 2019" << endl;
    return 0;
}

Getting below error:

1>------ Rebuild All started: Project: Project1, Configuration: Debug x64 ------ 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(434,5): warning MSB8003: The WindowsSDKDir property is not defined. Some build tools may not be found.

1>Source.cpp 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\crtdefs.h(10,10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory 1>Done building project "Project1.vcxproj" -- FAILED. ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

like image 941
Pankaj Avatar asked Dec 11 '25 15:12

Pankaj


1 Answers

I suggest you should download and install the Windows 10 SDK in the VS2019 installer.

enter image description here

The selected version needs to be the same as the version set in the project.

enter image description here

like image 56
Jeaninez - MSFT Avatar answered Dec 13 '25 06:12

Jeaninez - MSFT



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!