I found the source of the problem! The problem is my environment variable VCTargetsPath.
It turns out that mine is VCTargetsPathset to:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140
- what seems right; what is the correct directory.
Unfortunately, it lacks a final backslash - it should be:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\
Without this backslash at the end, it doesn't work.
Apparently, the problems I ran into were various Visual Studio examples trying to compile paths incorrectly on top of that path, for example. The following error I was trying to create an Android project (shown in bold):
1 > C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Clang.targets(210,5): MSB4062: "ClangCompile" C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\ V140Microsoft.Build.CppTasks.Common.dll. :///C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\ V140Microsoft.Build.CppTasks.Common.dll . .
, ( , ).
, , VCTargetsPath , , .
, , . ++, , .
1. . ++ (, Empty ++ Project), :
'null' is null or not an objectException from HRESULT: 0x800A138F
, : " " Project1 "... .
2. . , :
The desired name for C:\tmp\foo.cpp is invalid.The operation could not be completed. The parameter is incorrect.
.
3. . , MyProject Property Pages ( MyProject - ) : There are no property pages for the selection.
, , , , . Microsoft.Cpp.Win32.user Property Pages.
4. Visual Studio , . Visual Studio - ++ . , , : , - , . , .