tag:help.appveyor.com,2012-11-13:/discussions/problems/15092-ms-build-version-for-visual-studio-2017AppVeyor: Discussion 2018-09-12T21:00:33Ztag:help.appveyor.com,2012-11-13:Comment/456811802018-07-12T20:55:27Z2018-07-12T20:55:28ZMS Build Version for Visual Studio 2017<div><p>I get the following error message when trying to build with Visual Studio 2017 Image using custom build_script step using MSBuild.exe</p>
<pre>
<code> 1>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:\projects\simc\vs\simc_vs2017.vcxproj]</code>
</pre>
<p>Build: <a href="https://ci.appveyor.com/project/scamille/simc/build/job/sx4nampjxwvmh03k">https://ci.appveyor.com/project/scamille/simc/build/job/sx4nampjxwv...</a><br>
Appveyor.yml: <a href="https://github.com/simulationcraft/simc/blob/88109c3ce6d03df316e92e5881c2a4ee52dc3f8a/appveyor.yml">https://github.com/simulationcraft/simc/blob/88109c3ce6d03df316e92e...</a></p>
<p>I read about <a href="https://help.appveyor.com/discussions/questions/3448-platform-toolset-v141-cannot-be-found">https://help.appveyor.com/discussions/questions/3448-platform-tools...</a> but no satisfactory solution was provided there.</p></div>Serge Camilletag:help.appveyor.com,2012-11-13:Comment/456811802018-07-13T03:53:20Z2018-07-13T03:53:20ZMS Build Version for Visual Studio 2017<div><p>It looks like your intention was to change the build image for each build job given that you have an environment variable named <code>image:</code> defined in the 'environment.matrix' key. But that doesn't have the same meaning of the 'image' keyword at the top level of yaml. It's just a regular environment variable and therefore the default build image (Visual studio 2015) is being used in both jobs.</p>
<p>Instead you should use the <a href="https://www.appveyor.com/docs/environment-variables/#tweak-environment-variables">tweak environment variable</a> `APPVEYOR_BUILD_WORKER_IMAGE'.</p></div>Owen McDonnell