Answer the question
In order to leave comments, you need to log in
Build tools v141 can't be found?
A new cocos2d came out recently, installed a demo project and now I'm trying to build it.
In the 3rd version, there was already a .sln file right away, you immediately need to use a third-party CMake assembler.
Follow the build documentation https://github.com/cocos2d/cocos2d-x/tree/v4/cmake
cd cocos2d-x
mkdir win32-build && cd win32-build
cmake .. -G"Visual Studio 15 2017" -Tv141
C:\Users\BonBon.DESKTOP-B1B9CUP\GameDev\Cocos_2D\cocos2d-x-4.0\win32-build>
cmake .. -G"Visual Studio 16 2019" -Tv141
CMake Error at CMakeLists.txt:31 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 16.3.2+e481bbf88 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 12/12/2019 5:13:01 PM.
Project "C:\Users\BonBon.DESKTOP-B1B9CUP\GameDev\Cocos_2D\cocos2d-x-4.0\win32-build\CMakeFiles\3.16.1\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(379,5):
error MSB8020: The build tools for Visual Studio 2017 (Platform Toolset = 'v141') cannot be found. To build using the v141
build tools, please install Visual Studio 2017 build tools. Alternatively, you may upgrade to the current
Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting
"Retarget solution". [C:\Users\BonBon.DESKTOP-B1B9CUP\GameDev\Cocos_2D\cocos2d-x-4.0\win32-
build\CMakeFiles\3.16.1\VCTargetsPath.vcxproj]
Done Building Project "C:\Users\BonBon.DESKTOP-B1B9CUP\GameDev\Cocos_2D\cocos2d-x-4.0\win32-
build\CMakeFiles\3.16.1\VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\BonBon.DESKTOP-B1B9CUP\GameDev\Cocos_2D\cocos2d-x-4.0\win32-build\CMakeFiles\3.16.1\VCTargetsPath.vcxproj" (default target) (1) ->
(PrepareForBuild target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(379,5): error MSB8020: The build tools for
Visual Studio 2017 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install Visual
Studio 2017 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or
right-click the solution, and then selecting "Retarget solution". [C:\Users\BonBon.DESKTOP-
B1B9CUP\GameDev\Cocos_2D\cocos2d-x-4.0\win32-build\CMakeFiles\3.16.1\VCTargetsPath.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.13
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/BonBon.DESKTOP-B1B9CUP/GameDev/Cocos_2D/cocos2d-x-4.0/win32-build/CMakeFiles/CMakeOutput.log".
C:\Users\BonBon.DESKTOP-B1B9CUP\GameDev\Cocos_2D\cocos2d-x-4.0\win32-build>
The system is: Windows - 10.0.18362 - AMD64
Answer the question
In order to leave comments, you need to log in
https://github.com/cocos2d/cocos2d-x/issues/20411
Pay attention to the comments on the question.
If an error occurs
Unable to start program ....proj.win32\x64\Debug\ALL_BUILD
The system cannot find the file specified
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question