Bot Not Building

Hi there.

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.

Hi ikabot,

Can you try submitting your bot again please?

Hi

I have the same error. I think it is the version of visual studio I used to make it.

I just resubmitted my bot if it helps.

It seems to be working now.

Thanks for whatever you did.

Oooh, no, I jumped the gun. Let me check …

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?

That is strange,

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 tried re-uploading my SampleBot version, but that fails immediately.

I don’t know, I don’t think so.

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

  1. Changed all the PlatformToolSet tags to v140.
  2. 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.

Malman, WackyMax’s solution works a treat.

Just be careful to change every v141 to v140.

Thanks, I managed to build it at the 11th attempt (sorry for the zip spam).

Great,

Glad you managed to get it working. Once the first battle is done I will have a look at this again and see if I can get the v141 toolset to work.

Well, working is an exaggeration.

It doesn’t seem to be writing a place.txt or command.txt file.

Thanks as well mine also works now.

What is the path to the map.txt file relative to the argv[2] (the second commandline parameter)?