Ошибка "Could not find MSBuild with VCTools" в React Native, хотя Visual Studio установлена
Установил поддержку Windows для React Native согласно официальной документации. При запуске react-native run-windows возникает ошибка
‼ No public VS release found
i Trying pre-release VS
× Could not find MSBuild with VCTools for Visual Studio 16.7 or later. Make sure all required components have been installed
Command failed. Re-run the command with --logging for more information.
но я бы не задавал этот вопрос, если бы причина была действительно в отсутствующей Visual Studio.
Согласно руководству по настроке среды разработки, выполннил также эту комманду:
Set-ExecutionPolicy Unrestricted -Scope Process -Force;
iex (New-Object System.Net.WebClient).DownloadString('https://aka.ms/rnw-deps.ps1')
что не помогло.
Далее, следуя рекомендации Re-run the command with --logging for more information., получил следующие логи:
i Verbose: ON
Looking for vswhere at: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
‼ No public VS release found
i Trying pre-release VS
Looking for vswhere at: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
× Could not find MSBuild with VCTools for Visual Studio 16.7 or later. Make sure all required components have been installed
Command failed with error NoMSBuild: Could not find MSBuild with VCTools for Visual Studio 16.7 or later. Make sure all required components have been installed
Не помню, чтобы при установке VS я менял пути по умолчанию, и установка была произведена в директорию
C:\Program Files\Microsoft Visual Studio\2022
а React Native ищет в C:\Program Files (x86).
Ну и конечно же, плагины для разработки UWP у меня установлены.