This is a static, read-only archive of Wireshark Q&A. Older questions and answers from October 2017 and earlier can be found at osqa-ask.wireshark.org.
0

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

asked Dec 06 '17

updated Dec 06 '17

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".

Comments

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

User 83903 ( Dec 06 '17 )

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?

User 98587 ( Dec 06 '17 )

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,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.9.6\VCTargetsPath.vcxproj]
Done Building Project "C:\Users\Me\DDisk\FWork\WireShark\wsbuild64\CMakeFiles\3.9.6\VCTargetsPath.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\Users\Me\DDisk\FWork\WireShark\wsbuild64\CMakeFiles\3.9.6\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.9.6\VCTargetsPath.vcxproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:0
User 83903 ( Dec 06 '17 )

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.

User 83903 ( Dec 06 '17 )

I have my windows sdk 8.1 installed. but still i get the same error. Why?

User 14521 ( Apr 06 '19 )

@User 14521, this question is somewhat old and likely isn't discussing building with the same version you are now. Please ask your own question. Links to the output of the CMake generation step and the msbuild commands are helpful. Redirect the output to a text file by appending 2>&1 > output.txt to the commands.

User 98587 ( Apr 06 '19 )

1 Answer

0

answered Dec 06 '17

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

cc-by-sa Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.