在刚刚初始化的React Native应用中运行react-native windows
后,如果您立即运行react-native run-windows
,则会发生以下错误:
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.
答案 0 :(得分:1)
安装Visual Studio时可能会发生这种情况,但在尝试使用某些命令行工具之前从未将其作为“devenv.exe”启动。在react-native run-windows
命令可以调用命令行工具之前,首次启动Visual Studio时会发生一些其他设置。
有关详细信息,请参阅React Native Windows疑难解答部分: https://github.com/Microsoft/react-native-windows/blob/0.57-stable/docs/SetupTroubleshooting.md