【发布时间】:2016-03-10 09:04:17
【问题描述】:
我想在命令行中升级一个解决方案,以便我可以使用 VS 2015 构建该解决方案/该解决方案中的项目。但不知何故,这并不像预期的那样工作。
我在做什么
1) 从https://ssl.icu-project.org/repos/icu/icu/tags/release-56-1/下载源代码
2) 为 VS 2015 调用 vcvarsall.bat。
3) 为每个项目更改ToolsVersion
for /r "%cd%" %%a in ( *.vcxproj ) do (
sed.exe -i "s/ToolsVersion=\"4\.0\"/ToolsVersion=\"14\.0\"/g" "%%a"
)
4) 升级方案
rem upgrade solution
devenv "allinone\allinone.sln" /Upgrade
但是,我收到这样的警告:
warning : The build tools for Visual Studio 2010 (v100) cannot be
found. To build using the Visual Studio 2015 (v140) build tools,
either click the Project menu or right-click the solution, and then
select "Upgrade Solution...". Install Visual Studio 2010 (v100) to
build using the Visual Studio 2010 (v100) build tools.
我错过了什么?有没有办法通过命令行/批处理来完成?
【问题讨论】:
-
如果您只运行
devenv "allinone\allinone.sln" /Upgrade而不手动更改工具版本怎么办? devenv /upgrade 的输出是什么?
标签: visual-studio-2010 batch-file msbuild visual-studio-2015 devenv