2
votes

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 ==========

2

2 Answers

4
votes

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

0
votes

install the universal CRT SDK - refer the article here Universal-crt