Same error happens with Visual Studio 16 2019
.
cmake -DCMAKE_SYSTEM_NAME="WindowsStore" -DCMAKE_SYSTEM_VERSION="10.0" -A x64 -G "Visual Studio 17 2022" -S . -B build
CMake Error at CMakeLists.txt:2 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/amd64/MSBuild.exe
to get the value of VCTargetsPath:
MSBuild version 17.4.0+18d5aef85 for .NET Framework
Build started 29/11/2022 08:45:53.
Project "C:\Users\dyitzchaki\github\CoreApp\build\CMakeFiles\3.25.0\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(832,5): error : The BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\Users\dyitzchaki\github\CoreApp\build\CMakeFiles\3.25.0\VCTargetsPath.vcxproj]
Done Building Project "C:\Users\dyitzchaki\github\CoreApp\build\CMakeFiles\3.25.0\VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
The same command works with -G "Visual Studio 15 2017"
.
cmake version 3.25.0