我有一个只在Visual Studio 2017中生活过的项目。它是一个C++ dll,直到这一点我没有任何问题在Visual中构建它Studio GUI。但是现在我试图设置自动化功能,在命令行上构建项目并将输出文件上传到所需的位置。这是我到目前为止已经试过(在一个全新的命令提示符):无法从命令行运行msbuild for C++ VS2017
cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>
vcvarsall amd64
cd C:\Users\me\development\MyProject
msbuild MyProject.slnl (or msbuild MyProject\MyProject.vcxproj)
这给我的错误输出
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-cli
ck the solution, and then selecting "Retarget solution".
[C:\Users\dev\development\MetaReme\MetaReme\MetaReme.vcxproj]
让我再次重申,我已经在Visual已成功建立Studio 2017针对v141工具集,只是在我遇到问题的命令行上。在我的Visual Studio Installer应用程序中,我检查了VC++ 2017 v141工具集。我已经看过文件系统,并在C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\
文件夹中没有v141
文件夹。
谢谢!
您是否正在使用IDE构建'amd64'配置? – Mahesh
“Microsoft Visual Studio 14.0”与2015年相比,是否确定要使用正确版本的开发人员命令提示符? –