In your screenshot, the actual error message is not visible. Copying to the forum the content of the mini-log control at the bottom should provide us with the most information.
The error on the log file further says in CMakeOutput.log
“The system is: Windows - 10.0.18362 - AMD64”
Hello,
I have exactly the same error when I want build ITK 5.2 or other with CMake 3.21.
Is there a solution to fix this or a other way to install ITK?
Thanks
What’s shown above is only the “end result”, not the actual error message. That is shown in the log window some time before.
You need to scroll up in the log window at the bottom of CMake (or enlarge it), then you should see some text in red with the actual error that occurred which caused CMake to fail.
Oh yes, I see !
There is the error message:
CMake Error at CMakeLists.txt:30 (project):
Failed to run MSBuild command:
C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 4.8.4084.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft Corporation. All rights reserved. Build started 04/10/2021 18:22:32. Project "C:\itk\Build\CMakeFiles\3.21.3\VCTargetsPath.vcxproj" on node 1 (default targets). C:\itk\Build\CMakeFiles\3.21.3\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. Done Building Project "C:\itk\Build\CMakeFiles\3.21.3\VCTargetsPath.vcxproj" (default targets) -- FAILED. Build FAILED. "C:\itk\Build\CMakeFiles\3.21.3\VCTargetsPath.vcxproj" (default target) (1) -> C:\itk\Build\CMakeFiles\3.21.3\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.16
Exit code: 1
This seems like a broken Visual Studio installation. Can you try “repair” in Visual Studio installer? If that does not help, try uninstalling, then reinstalling.
Oh yes I see !!
I installed a new visual studio version and now it works.
Thanks everyone for your help