When I upload my bot, I get build error in the logs (for both a VS2015 and VS2017 project).
This is the error for the latest (VS2017) zip file that I uploaded.
09-06-2017 09:32:28:834 - I: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v141 (Platform Toolset = ‘v141’) cannot be found. To build using the v141 build tools, please install v141 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:\Challenge2017\Bot Submissions\Compiled\369\Extract\Ikabot\Ikabot.vcxproj]
Please help. It builds and runs fine on my machine.
Yes, it took longer to fail this time, but failed with the same error:
09-06-2017 11:32:07:635 - I: Creating directory “x64\Release”.
09-06-2017 11:32:07:682 - I: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v141 (Platform Toolset = ‘v141’) cannot be found. To build using the v141 build tools, please install v141 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:\Challenge2017\Bot Submissions\Compiled\375\Extract\Ikabot\Ikabot.vcxproj]
Is there something I could do to my solution or project file? What are the v141 build tools that it’s complaining about?
I installed the latest version of visual studio and I am using that to build the solution now. Did you use the solution file from the sample bot on the Github page?
Initially, yes, but I subsequently created my own solution and copied my source into it because I was worried that the extraneous libraries in the sample bot could have been giving me problems.
I don’t know how relevant this is, but I’m using the _CRT_SECURE_NO_WARNINGS pre-processor directive. Could that be to blame?
I don’t work with C++ a lot so this is unknown territory for me as well. I did make some changes to the original solution submitted in order to get it to work correctly. I made the following changes to the project file SampleBot.vcxproj using a xml editor
Changed all the PlatformToolSet tags to v140.
Removed the WindowsTargetPlatformVersion tag.
Can you maybe try that and see if it makes a difference
I noticed these changes made to the sample bot vcxproj file, so I made the same changes to my bot’s vcxproj file, uploaded it, and it compiles and runs on the Player Portal without issue.
I had to install the Visual Studio 2015 toolset (v140) in Visual Studio 2017 to test it locally.