Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix build error when running `react-native run-windows`?

After running react-native windows in a freshly initialized React Native app, if you immediately run react-native run-windows this error happens:

Build failed with message Error: Command failed: "C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" "C:/<path_to_project>/windows/<project_name>.sln" /clp:NoSummary;NoItemAndProperty;Verbosity=minimal /nologo /p:Configuration=debug /p:Platform=x86 . Check your build configuration.

like image 736
Matt Hargett Avatar asked Nov 15 '25 22:11

Matt Hargett


1 Answers

This can happen when you have installed Visual Studio, but never started it as "devenv.exe" before trying to use some commandline tools. There is some additional setup that happens on first launch of Visual Studio before the commandline tools can be invoked by the react-native run-windows command.

See the React Native Windows troubleshooting section for more information: https://github.com/microsoft/react-native-windows/blob/0.60-stable/current/docs/SetupTroubleshooting.md

like image 170
Matt Hargett Avatar answered Nov 17 '25 20:11

Matt Hargett



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!