1

我想升級在命令行的解決方案,這樣我就可以建立一個解決方案/該解決方案中的項目,2015年VS不知何故,但不起作用像預期。改變構建從VS2010工具VS2015在命令行

我在做什麼

1)從https://ssl.icu-project.org/repos/icu/icu/tags/release-56-1/

2)調用vcvarsall.bat下載的源代碼,VS 2015

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. 

我缺少什麼?有沒有辦法如何使用命令行/批處理?

+0

如果您只是運行'devenv「allinone \ allinone.sln」/升級'而無需手動更改toolsversion?另外devenv /升級的輸出是什麼? – stijn

回答

1

必須補充一點:

<PropertyGroup><PlatformToolset>v140</PlatformToolset><PropertyGroup> 

來源:使用vs2015升級項目和檢查的diff

您更改ToolsVersion指的MSBuild我想。 PlatformToolset改變了編譯工具鏈。

1

在Visual Studio 2015環境中,右鍵單擊解決方案資源管理器視圖中的解決方案,然後選擇「重定向解決方案」。