Failed to run MSBuild command (CMake Error at CMakeLists.txt:22 (project))
I try to compile the Wireshark source code in my Windows 10 PC, with
Visual Studio community 2015
QT 5.6.3
Cygwin
Python
Cmake
(https://www.wireshark.org/docs/wsdghtmlchunked/ChSetupWin32.html#ChSetupPrepareCommandCom)
I setup the environment as (chapter 2.2.9 in the above web page)
When I try to compile it with
cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 14 2015 Win64" ..\wireshark
It is failed like that:
cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 14 2015 Win64" ..\wireshark
-- Selecting Windows SDK version to target Windows 10.0.15063.
CMake Error at CMakeLists.txt:22 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 12/5/2017 4:09:51 PM.
Project "C:\Users\Me\DDisk\FWork\WireShark\wsbuild64\CMakeFiles\3.10.0\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\Me\DDisk\FWork\WireShark\wsbuild64\CMakeFiles\3.10.0\VCTargetsPath.vcxproj]
Done Building Project "C:\Users\Me\DDisk\FWork\WireShark\wsbuild64\CMakeFiles\3.10.0\VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Me\DDisk\FWork\WireShark\wsbuild64\CMakeFiles\3.10.0\VCTargetsPath.vcxproj" (default target) (1) ->
(Desktop_PlatformPrepareForBuild target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\Me\DDisk\FWork\WireShark\wsbuild64\CMakeFiles\3.10.0\VCTargetsPath.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.08
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Me/DDisk/FWork/WireShark/wsbuild64/CMakeFiles/CMakeOutput.log".
Failed to run MSBuild command: but I checked there is "msbuild.exe" in the correct PATH/Folder.
You don't indicate the CMake version you're using, but from the output line
Project "C:\Users\Me\DDisk\FWork\WireShark\wsbuild64\CMakeFiles\3.10.0\VCTargetsPath.vcxproj" on node 1 (default targets).
it would appear to be CMake 3.10.0, i.e. the brand new version and as myself and all the build slaves are still building with older versions of CMake, this might be the cause. Can you try using CMake 3.9.x?Hi grahamb, Thank you very much. I just remove my cmake 3.10.0, and install cmake 3.9.6, like:
CMake suite maintained and supported by Kitware (kitware.com/cmake).
and then, run the same command, get the same error (CRY:)
CMake Error at CMakeLists.txt:22 (project): Failed to run MSBuild command:
to get the value of VCTargetsPath:
(more)I found it was from windows SDK issue, windows SDK 8.1 is not installed in my PC, so that is it.
Of course, after solving the issue, I have another issue for the compiling. (It is still not completed), I am still struggling with it, but I am going to create another ticket for the problem. Thank you all.
I have my windows sdk 8.1 installed. but still i get the same error. Why?