We distribute a set of Visual Studio 2010 project files. Users are expected to upgrade to suit their taste. Our .appveyor.yml
file includes the following images (in addition to configurations and platforms):
- Visual Studio 2017
- Visual Studio 2015
- Visual Studio 2013
- Visual Studio 2012
- Visual Studio 2010
The Visual Studio 2017 build failed with:
Build started
git clone -q --depth=3 --branch=master https://github.com/noloader/cryptopp.git C:\projects\cryptopp
git checkout -qf 3504f1da2591d8b84e356527ed41dc6209eafa06
msbuild "C:\projects\cryptopp\cryptest.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
Microsoft (R) Build Engine version 15.1.1012.6693
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(55,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 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\cryptopp\cryptlib.vcxproj]
Command exited with code 1
The text of interest is:
error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 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".
When I am working from developer command prompts, I run VCUpgrade
or I use GitBash and sed -i s'|Tools>v100|Tools>v120' *vcxproj*
to change the platform toolset.
When I try to run it through the AppVeyor test_script:
, it results in another failure. For example, from the 1.0.131 build log:
...
vcupgrade.exe -nologo -overwrite cryptlib.vcxproj
'vcupgrade.exe' is not recognized as an internal or external command,
operable program or batch file.
Command exited with code 1
My question is, how do we tell Appveyor to change the platform toolset? Is there a step or configuration option to run VCUpgrade
? Or do we do something else?
This is the help provided when running VCUpgrade locally:
> vcupgrade
Microsoft (R) Visual C++ Project Convert Utility - Version 11.00.61030
Copyright (C) Microsoft Corporation. All rights reserved.
Usage: VCUpgrade [options] <project file>
Options:
-nologo Suppresses the copyright message
-nocolor Do not output error and warning messages in color
-overwrite Overwrite existing files
-PersistFramework Keep the Target Framework Version while upgrading. (-p)