-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Environment
npx react-native --version
4.13.0
npx react-native info
System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Memory: 1.88 GB / 15.84 GB
Binaries:
Node: 12.16.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions: 10.0.16299.0, 10.0.17134.0, 10.0.17763.0, 10.0.18362.0, 10.0.19041.0
IDEs:
Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6626763
Visual Studio: 16.9.30709.64 (Visual Studio Community 2019), 16.8.30711.63 (Visual Studio Community 2019)
Languages:
Java: 14.0.2
Python: 3.8.2
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
Visual Studio Version
16.8
Installed SDK Version
16299, 17134, 17763, 18362, 19041
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
-
npx react-native init --template react-native-template-typescript@6.5.*
-
cd projectName
-
npx react-native-windows-init --overwrite
-
npx react-native run-windows
-
Error
Failed to restore the NuGet packages: Error: C:\Users\Nero\code\jithub\node_modules\react-native-windows\Microsoft.ReactNative.Managed\Microsoft.ReactNative.Managed.csproj(154,11): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\WindowsXaml\v16.0\Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Also, tried to find "Microsoft\WindowsXaml\v16.0\Microsoft.Windows.UI.Xaml.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\bin\msbuild.exe.Config". Confirm that the path in the declaration is correct, and that the file exists on disk in one of the search paths.
C:\Users\Nero\code\jithub\node_modules\react-native-windows\Microsoft.ReactNative.Managed.CodeGen\Microsoft.ReactNative.Managed.CodeGen.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
Expected Results
"A new Command Prompt window will open with the React packager as well as a react-native-windows app. "
react-native run-windows --logging
× 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 NETSDK1004: Assets file 'C:\Users\Nero\code\jithub\node_modules\react-native-windows\Microsoft.ReactNative.Managed.CodeGen\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\Users\Nero\code\jithub\node_modules\react-native-windows\Microsoft.ReactNative.Managed.CodeGen\Microsoft.ReactNative.Managed.CodeGen.csproj]. Check your build configuration.
See C:\Users\Nero\AppData\Local\Temp\msbuild_27456.err