error MSB8020: The build tools for v140 (Platform Toolset = ‘v140’) cannot be found. To build using the v140 build tools, please install v140 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting “Retarget solution”.
Cause
The required version of build tool for building solution is different from the version of build tool on your environment.
Checklist
Retarget the solution. Right click on the solution and click the “Retarget solution”. Select the version of build tool required.
There is truly no library with such a name because of misspelling or missing in file path.
Additional Library Directories
Visual Studio can’t read the directory where ‘~~.lib’ is in. Check the include file. Open properties of the project and check “Additional Library Directories”.
Right click the project name on Solution explorer and open Properties.
Add the directory that contains the library into Linker > General >Additional Library Directories”.
Configuration
If the target directory already exists in Additional Library Directories list, check Configuration and the build environment. If they are different, change the configuration and add the library to Additional Library Directories again.
Cannot open include file: ‘<FILE_NAME>’: No such file or directory
Cause
Visual Studio can’t find the include file named FILE_NAME.
Checklist
File name
There is truly no file with such a name because of misspelling, mistake for file extension or missing in file path. Compare the name and path of the include file to your code.
Additional Include Directories
Visual Studio can’t read the directory where FILE_NAME is in. Check the include file. Open properties of the project and check “Additional Include Directories”.
Right click the project name on Solution explorer and open Properties.
Add the directory that contains the include file into C/C++ >Additional Include Directories”.
Configuration
If the target directory already exists in Additional Include Directories list, check Configuration and the build environment. If they are different, change the configuration and add the include folder to Additional Include Directories again.