Build tools v141 can not be found?

Released recently a new cocos2d, set the demo project and are now trying to collect.
In the 3rd version once already .sln file, then you should use a third-party collector CMake.
Follow the 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


Whatever it is, follow the instructions in the documentation get this error message
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): 
MSB8020 error: 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>


.log
The system is: Windows - 10.0.18362 - AMD64

There are tools, sample project cocos2d version 3.17 built in VS 2019 tulsani v141 works.

  1. Why go to the cocos2d folder instead of project folder, because it is necessary to collect the project and not cocos2d which is already installed in the project?
  2. Why tools can not be found when they are?
  3. And why Failed to run MSBuild?
  4. Why is it to talk about the project because it yet, just trying to create .sln!?
April 3rd 20 at 17:41
1 answer
April 3rd 20 at 17:43
Solution
https://github.com/cocos2d/cocos2d-x/issues/20411

Note the comments to the question.
If an error occurs
Unable to start program ....proj.win32\x64\Debug\ALL_BUILD
The system cannot find The file specified

after cmake, during the debug build, right click on the project solution-> set startup project -> replace ALL_BUILD to the name of your prog, then make a solution on a project-> clean -> rebuild
Maybe that'll help.

Find more questions by tags C++CMakeCocos2dVisual Studio