我们分发了一组 Visual Studio 2010 项目文件。用户应该根据自己的口味进行升级。我们的.appveyor.yml file http://github.com/weidai11/cryptopp/blob/master/.appveyor.yml包括以下图像(除了配置和平台):
- 视觉工作室 2017
- 视觉工作室 2015
- 视觉工作室2013
- 视觉工作室2012
- 视觉工作室2010
Visual Studio 2017 构建失败,原因如下:
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
感兴趣的文本是:
错误 MSB8020:找不到 Visual Studio 2010 的构建工具(平台工具集 = 'v100')。要使用 v100 构建工具进行构建,请安装 Visual Studio 2010 构建工具。或者,您可以通过选择“项目”菜单或右键单击解决方案,然后选择“重新定位解决方案”来升级到当前的 Visual Studio 工具。
当我在开发人员命令提示符下工作时,我运行VCUpgrade
或者我使用 GitBash 和sed -i s'|Tools>v100|Tools>v120' *vcxproj*
更改平台工具集。
当我尝试通过 AppVeyor 运行它时test_script:
,这会导致另一次失败。例如,从1.0.131 构建日志 https://ci.appveyor.com/project/noloader/cryptopp/build/1.0.131/job/6eihy013eqs6y5nu:
...
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
我的问题是,我们如何告诉 Appveyor 更改平台工具集?是否有要运行的步骤或配置选项VCUpgrade
?或者我们做点别的吗?
这是本地运行 VCUpgrade 时提供的帮助:
> 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)