Skip to content

run-windows broken after updating to Visual Studio 16.8 #6495

@dstampher

Description

@dstampher

Just following the official react-native-windows Getting Started guide and the example project won't build. I also followed all of the instructions for installing the dependencies found here: https://microsoft.github.io/react-native-windows/docs/rnw-dependencies

Environment

npx react-native --version
4.13.0

npx react-native info
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.19041
CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
Memory: 9.26 GB / 15.95 GB
Binaries:
Node: 12.18.4 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowAllTrustedApps: Disabled
AllowDevelopmentWithoutDevLicense: Enabled
Versions: 10.0.17763.0, 10.0.18362.0
IDEs:
Android Studio: Not Found
Visual Studio: 16.8.30709.132 (Visual Studio Community 2019)
Languages:
Java: Not Found
Python: 3.8.6
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.3 => 0.63.3
react-native-windows: ^0.63.0-0 => 0.63.8
npmGlobalPackages:
react-native: Not Found

Steps To Reproduce

  1. Follow steps at https://microsoft.github.io/react-native-windows/docs/getting-started up to running the npx react-native run-windows command.

Expected Results

The Getting Started example app to run on my desktop.

npx react-native run-windows --logging output (github won't let me post the entire output, but here is the error):

× Building Solution
× Build failed with message 11>C:\Program Files\dotnet\sdk\5.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1005: Assets file 'c:\Users\david\Projects\testProj\node_modules\react-native-windows\Microsoft.ReactNative.Managed.CodeGen\obj\project.assets.json' doesn't have a target for 'netcoreapp3.1'. Ensure that restore has run and that you have included 'netcoreapp3.1' in the TargetFrameworks for your project. [c:\Users\david\Projects\testProj\node_modules\react-native-windows\Microsoft.ReactNative.Managed.CodeGen\Microsoft.ReactNative.Managed.CodeGen.csproj]. Check your build configuration.
See C:\Users\david\AppData\Local\Temp\msbuild_6944.err

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions