Ask Your Question
0

Failed to run MSBuild command (CMake Error at CMakeLists.txt:22 (project))

asked 2017-12-06 00:27:22 +0000

qutefu gravatar image

updated 2017-12-06 07:23:41 +0000

Guy Harris gravatar image

I try to compile the Wireshark source code in my Windows 10 PC, with

  1. Visual Studio community 2015

  2. QT 5.6.3

  3. Cygwin

  4. Python

  5. 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".
edit retag flag offensive close merge delete

Comments

Failed to run MSBuild command: but I checked there is "msbuild.exe" in the correct PATH/Folder.

qutefu gravatar imagequtefu ( 2017-12-06 00:42:51 +0000 )edit

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?

grahamb gravatar imagegrahamb ( 2017-12-06 10:14:33 +0000 )edit

Hi grahamb, Thank you very much. I just remove my cmake 3.10.0, and install cmake 3.9.6, like:

cmake --version cmake version 3.9.6

CMake suite maintained and supported by Kitware (kitware.com/cmake).

and then, run the same command, get the same error (CRY:)

cmake -DENABLECHMGUIDES=on -G "Visual Studio 14 2015 Win64" ..\wireshark

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/6/2017 10:16:42 AM.
Project "C:\Users\Me\DDisk\FWork\WireShark\wsbuild64\CMakeFiles\3.9.6\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36 ...
(more)
qutefu gravatar imagequtefu ( 2017-12-06 18:20:45 +0000 )edit

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.

qutefu gravatar imagequtefu ( 2017-12-06 19:10:42 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-12-06 19:12:20 +0000

qutefu gravatar image

The dedicated problem is solved, which has been described in the above comments. Thank you guys.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-12-06 00:27:22 +0000

Seen: 80 times

Last updated: Dec 06