Ошибка msbuild msb8020 как исправить

Permalink

Cannot retrieve contributors at this time

title description ms.date ms.topic f1_keywords dev_langs author ms.author manager ms.technology ms.workload

MSBuild error MSB8020

MSBuild error MSB8020 occurs when the platform toolset required by the build isn’t installed.

10/29/2021

error-reference

MSB8020

C++

ghogen

ghogen

jmartens

msbuild

multiple

MSBuild error MSB8020

MSB8020: The build tools for toolset-name (Platform Toolset = ‘platform-toolset‘) cannot be found. To build using the platform-toolset build tools, please install toolset-name 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”.

To resolve this issue, upgrade the project to use the current Visual Studio toolset, or use the Visual Studio Installer to install the specified build toolset. For more information, see Modify Visual Studio. Use the Individual components tab in the installer to choose specific platform toolsets.

This is the GitHub page where I’m trying to use msbuild.exe only it’s throwing this following error:

1>------ Build started: Project: keycastow, Configuration: Debug|Win32 ------
C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildMicrosoftVCv160Microsoft.CppBuild.targets(379,5): error MSB8020: The build tools for Visual Studio 2013 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install Visual Studio 2013 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".
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Is there 2 possible options to get this on GitHub to work?

NOTE: I would prefer option number one.

  1. To update the current code to 2019 standards (would that be difficult for a beginner)?
  2. Get the current v120 build tools to work.
    • Am I missing dependencies for it to work? My current installs View
    • I’ve checked this thread here and downloaded Microsoft Build Tools 2013 and installed but I’m having the same problem. Seeing as I’m using 2019, I thought it best to open up a new thread.

Additional info

  • Here’s a screenshot of what I’ve currently installed in Visual Studio 2019.
    View.

  • There are no options in the current version to install Microsoft Build Tools 2013 in the app itself so the installed standalone version doesn’t appear here as an option.

asked Jun 23, 2019 at 16:21

Ste's user avatar

2

Open the keycastow.vcxproj with notepad, change here the <PlatformToolset>v120</PlatformToolset> to <PlatformToolset>v142</PlatformToolset> to use the VC++ 2019 platform or change the version via UI

In Visual Studio, in Solution Explorer, open the shortcut menu for
your project (not for your solution) and then choose Properties to
open your project Property Pages dialog box.

  1. In the Property Pages dialog box, open the Configuration drop-down list and then select All Configurations.

  2. In the left pane of the dialog box, expand Configuration Properties and then select General.

  3. In the right pane, select Platform Toolset and then select the toolset you want from the drop-down list (2019 – v142 in your case)

  4. Choose the OK button.

Now you compile the project without installing anything.

answered Jun 23, 2019 at 18:46

magicandre1981's user avatar

magicandre1981magicandre1981

27.7k5 gold badges85 silver badges127 bronze badges

3

For VS2019, I had to switch from a Visual Studio Build to an MSBuild Build and then specify which MSBuild.exe the build machine would run. The default was from a different PlatformToolset.

MSBuild Solution Options

Change the Path to MSBuild to the correct MSBuild.exe; e.g.

C:Program Files (x86)Microsoft Visual Studio2019EnterpriseMSBuildCurrentBinamd64MSBuild.exe

answered Apr 5, 2021 at 21:26

ergohack's user avatar

ergohackergohack

1,24015 silver badges26 bronze badges

Got the following error message trying to build a Visual Studio 2022 project

Error MSB8020: The build tools for v143 (Platform Toolset = ‘v143’) cannot be found. To build using the v143 build tools, please install v143 build tools.

Your solution and this one worked for me 🙂

Visual Studio 2022 not listed in devops build solution pipeline task

answered Mar 15, 2022 at 13:45

user18473236's user avatar

1

  • Remove From My Forums
  • Question

  • Hi,

    I am trying to build a solution using MSBuild but I get an error seemingly indicating some tools are not installed. I looked in the directories and they indeed seem to be nowhere found. The message I get is:

    C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V140Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build t
    ools for v141 (Platform Toolset = ‘v141’) cannot be found. To build using the v141 build tools, please install v141 bui
    ld 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:UsersJuan DentC++ DevelopmentSource Componentsmetashel
    lmetashell3rdtemplightbuildZERO_CHECK.vcxproj]

    and the MSBuild directory v4.0 only has v110, v120, v140 — not v141!

    Thanks,

    Juan 


    Juan Dent

Answers

  • Disable the MSBuild parallel build options?

    This will only let MSBuild start one project build at a time.


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because
    the major point of my posts is to aid in the learning process.

    • Marked as answer by

      Sunday, January 21, 2018 12:26 AM

dabriones

-15 / 1 / 1

Регистрация: 16.04.2015

Сообщений: 395

1

23.05.2016, 18:45. Показов 23452. Ответов 7

Метки нет (Все метки)


Студворк — интернет-сервис помощи студентам

Пробую собрать и выдает ошибку:

C++
1
2
3
4
1>------ Построение начато: проект: MiniBase, Конфигурация: Debug Win32 ------
1>Файл проекта содержит ToolsVersion="14.0". Возможно, этот набор инструментов неизвестен или отсутствует (в этом случае проблему можно устранить, установив подходящую версию MSBuild), либо для данной сборки определено конкретное значение ToolsVersion в параметрах политики. Проект обрабатывается как имеющий ToolsVersion="4.0". Дополнительные сведения см. по ссылке [url]http://go.microsoft.com/fwlink/?LinkId=291333[/url].
1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V110Microsoft.Cpp.Platform.targets(44,5): error MSB8020: The builds tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v140 to build using the v140 build tools.
========== Построение: успешно: 0, с ошибками: 1, без изменений: 0, пропущено: 0 ==========

Файлы: Engine Hack Base 2015.rar



0



-15 / 1 / 1

Регистрация: 16.04.2015

Сообщений: 395

24.05.2016, 16:52

 [ТС]

2

Использовал Microsoft Visual 2012

Добавлено через 21 час 32 минуты
Куда подевались люди….



0



Эксперт С++

3069 / 1407 / 425

Регистрация: 19.01.2009

Сообщений: 3,852

24.05.2016, 22:19

3

Лучший ответ Сообщение было отмечено BRcr как решение

Решение

dabriones, откройте свойства проекта. Во вкладке General есть пункт Platform Toolset, в нем указано v140. Поменяйте его значение на v110 (выбор из выпадающего списка). Жмем Ок. Пробуйем собрать снова.



2



-15 / 1 / 1

Регистрация: 16.04.2015

Сообщений: 395

24.05.2016, 22:53

 [ТС]

4

Не наблюдаю такого!

Построение невозможно - MSB8020: The builds tools for v140 (Platform Toolset = 'v140') cannot be found



0



-15 / 1 / 1

Регистрация: 16.04.2015

Сообщений: 395

24.05.2016, 22:55

 [ТС]

5

Построение невозможно - MSB8020: The builds tools for v140 (Platform Toolset = 'v140') cannot be found



0



dabriones

-15 / 1 / 1

Регистрация: 16.04.2015

Сообщений: 395

24.05.2016, 23:05

 [ТС]

6

Нашел и толку 0, как исправить?

C++
1
2
3
4
1>------ Перестроение всех файлов начато: проект: MiniBase, Конфигурация: Release Win32 ------
1>Файл проекта содержит ToolsVersion="14.0". Возможно, этот набор инструментов неизвестен или отсутствует (в этом случае проблему можно устранить, установив подходящую версию MSBuild), либо для данной сборки определено конкретное значение ToolsVersion в параметрах политики. Проект обрабатывается как имеющий ToolsVersion="4.0". Дополнительные сведения см. по ссылке [url]http://go.microsoft.com/fwlink/?LinkId=291333[/url].
1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V110Microsoft.Cpp.Platform.targets(44,5): error MSB8020: The builds tools for v110_xp (Platform Toolset = 'v110_xp') cannot be found. To build using the v110_xp build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v110_xp to build using the v110_xp build tools.
========== Перестроение всех: успешно: 0, с ошибками: 1, пропущено: 0 ==========

Построение невозможно - MSB8020: The builds tools for v140 (Platform Toolset = 'v140') cannot be found



0



Эксперт С++

3069 / 1407 / 425

Регистрация: 19.01.2009

Сообщений: 3,852

25.05.2016, 15:34

7

Лучший ответ Сообщение было отмечено dabriones как решение

Решение

Цитата
Сообщение от dabriones
Посмотреть сообщение

v110_xp

в выпадающем списке есть v110 без xp? Попробуйте каждый тулсет, который есть у вас в списке. Кстати, что там у Вас?



1



-15 / 1 / 1

Регистрация: 16.04.2015

Сообщений: 395

25.05.2016, 21:21

 [ТС]

8

Там не было, но я нашел в другом проекте – Visual Studio 2012 (v110) и всё заработало!



0



When I right click the project and go to settings, I can clear see that the Platform Toolset is set to Visual Studio 2015 (v140). However, when I go to compile the project, the error says

C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V140Microsoft.Cpp.Platform.targets(54,5): error MSB8020: The build tools for Visual Studio 2012 (Platform Toolset = 'v110') cannot be found. To build using the v110 build tools, please install Visual Studio 2012 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".

I tried doing the recommendation, and “retarget solution,” but that does nothing.

If I open the references .targets file, I see no references to V140. I tried changing all of the references from V110 (as an experiment) to V140, but when I went to recompile, it just changed them all back to V110 and generated the same error.

Any ideas on how to stop VS from targeting V110 when it says that it is targeting V140?

Добавить комментарий