cmake编译出来的项目有问题

Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19042.
CMake Error at CMakeLists.txt:6 (project):
Failed to run MSBuild command:

C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe

to get the value of VCTargetsPath:

用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.8.2+25e4d540b

版权所有(C) Microsoft Corporation。保留所有权利。



生成启动时间为 2022/9/14 16:42:45。

节点 1 上的项目“D:\搜狗高速下载\undo-main\undo-main\build\CMakeFiles\3.24.2\VCTargetsPath.vcxproj”(默认目标)。

PrepareForBuild:

  正在创建目录“x64\Debug\”。

  正在创建目录“x64\Debug\VCTargetsPath.tlog\”。

InitializeBuildStatus:

  正在创建“x64\Debug\VCTargetsPath.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。

FinalizeBuildStatus:

  正在删除文件“x64\Debug\VCTargetsPath.tlog\unsuccessfulbuild”。

  正在对“x64\Debug\VCTargetsPath.tlog\VCTargetsPath.lastbuildstate”执行 Touch 任务。

已完成生成项目“D:\搜狗高速下载\undo-main\undo-main\build\CMakeFiles\3.24.2\VCTargetsPath.vcxproj”(默认目标)的操作。



已成功生成。

    0 个警告

    0 个错误



已用时间 00:00:00.19

Configuring incomplete, errors occurred!
See also "D:/搜狗高速下载/undo-main/undo-main/build/CMakeFiles/CMakeOutput.log".

这里是windows SDK包版本和wondows版本不一致吗,我试了很多版本了,报错cmake版本新的旧的也试了,一直是这个问题,生成的解决方案无法正常使用,有没有什么方法可以解决这个问题

已解决https://blog.csdn.net/qq_42956179/article/details/114869735
问题应该是在Visual Studio Installer操作问题,只修改没有进行修复,导致vs环境没有改变