Visual Studio 2015-решение для ретаргета командной строки

попытка создать более старый проект (VS2010) с помощью Visual Studio 2015 - из командной строки. Но, я получаю это:

C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V140Microsoft.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".

кто-нибудь знает, как "изменить решение" из командной строки?

1 ответов


C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(55,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found.

очевидно, у вас нет Visual Studio 2010 (Platform Toolset = 'v100') набор инструментов установлен, и ваш старый проект (Visual Studio 2010) ссылается на него.

ваши возможности:

  1. если открыть файл vcxproj в Visual Studio 2015,Go to project properties -> General settings. вы увидите, что есть свойство PlatformToolset. Для visual studio 2015 это v114; для Visual Studio 2010 это v100.

    измените набор инструментов платформы на Visual Studio 2015 (Platform Toolset = 'v140'). Тогда вы сможете сборка из командной строки и из редактора VS, а также (будьте осторожны, обновление решения не гарантирует, что решение будет строить штраф.)

  2. вы можете установить PlatformToolset без изменения файла vcxproj. Вы можете перезаписать свойство PlatformToolset с помощью /p:PlatformToolset=v140 изменить набор инструментов.

    например msbuild myProject.vcxproj /p:PlatformToolset=v140

если вы не знаете набор инструментов платформы и их значения:

Visual Studio .NET 2002 (Platform Toolset = 'v70')
Visual Studio .NET 2003 (Platform Toolset = 'v71')
Visual Studio 2005      (Platform Toolset = 'v80')
Visual Studio 2008      (Platform Toolset = 'v90')
Visual Studio 2010      (Platform Toolset = 'v100')
Visual Studio 2012      (Platform Toolset = 'v110')
Visual Studio 2013      (Platform Toolset = 'v120')
Visual Studio 2015      (Platform Toolset = 'v140')
Visual Studio 2017      (Platform Toolset = 'v141')
...