Failed to run MSBuild command:
D:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe
to get the value of VCTargetsPath:
用于 .NET Framework 的 Microsoft (R) 生成引擎版本 17.2.1+52cd2da31
版权所有(C) Microsoft Corporation。保留所有权利。
生成启动时间为 2022/8/6 16:44:58。
节点 1 上的项目“D:\VTK\vtk-file\CMakeFiles\3.23.2\VCTargetsPath.vcxproj”(默认目标)。
InitializeBuildStatus:
正在对“x64\Debug\VCTargetsPath.tlog\unsuccessfulbuild”执行 Touch 任务。
D:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB6003: 指定的任务可执行文件“cmd.exe”未能运行。
System.IO.IOException: 未能创建临时文件 。临时文件文件夹已满或其路径不正确。
对路径“C:\Users???\AppData\Local\Temp\”的访问被拒绝。 ---> System.UnauthorizedAccessException: 对路径“C:\Users???\AppData\Local\Temp\”的访问被拒绝。 [D:\VTK\vtk-file\CMakeFiles\3.23.2\VCTargetsPath.vcxproj]
其实不止配置vtk库会显示,配置ITK,DCMTK都会遇到这个问题,上网查找解决办法无果后,只能来寻求帮助 无论能不能解决,先感谢大家的帮助!!
版本不匹配,换一个旧点版本
更新一下:路径拒绝访问是因为权限不够,右击cmake以管理员身份运行就可以了