0

I am trying to install and run React Native on Windows UWP using C++. The rest of the process works fine but in the end build fails with the error: The system was unable to find the specified registry key or value.

I am using Visual Studio 2022, Node.JS version v18.15.0, Windows 10 with toolset version v143, and SDK 10.0.22621.0.

The following script command is used to install the dependencies;

Set-ExecutionPolicy Unrestricted -Scope Process -Force; iex (New-Object System.Net.WebClient).DownloadString('https://aka.ms/rnw-vs2022-deps.ps1');

The following commands successfully ran without errors when creating the UWP React Native project.

  • npx react-native init testproject4 --template react-native@^0.71.0
  • cd testproject4
  • npx react-native-windows-init --overwrite
  • npx react-native autolink-windows

Then running the project in a debug or without debugging mode from the VS2022 fails at the end after throwing the two errors. Both x86 and 64bit are tried.

The system was unable to find the specified registry key or value.

Error MSB3073 The command "npx react-native autolink-windows --check --sln [tag:"windows\testproject4.sln" --proj "windows\testproject4\testproject4.vcxproj"" exited with code -1. testproject4 C:\tmp\testproject4\node_modules\react-native-windows\PropertySheets\Autolink.targets 17

When I run the following command from the PowerShell;

  • npx react-native run-windows

It throws the following errors;

ERROR: The system was unable to find the specified registry key or value.

MSBuild version 17.5.0+6f08c67f3 for .NET Framework Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch. Build started 12/04/2023 11:41:23 AM. Included response file: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.rsp

Project "C:\tmp\testproject4\windows\testproject4.sln" on node 1 (Restore target(s)). C:\tmp\testproject4\windows\testproject4.sln.metaproj : error MSB4126: The specified solution configuration "Debug|ia32 " is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBui ld.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default so lution configuration. [C:\tmp\testproject4\windows\testproject4.sln] Done Building Project "C:\tmp\testproject4\windows\testproject4.sln" (Restore target(s)) -- FAILED.

Build FAILED.

"C:\tmp\testproject4\windows\testproject4.sln" (Restore target) (1) -> (ValidateSolutionConfiguration target) -> C:\tmp\testproject4\windows\testproject4.sln.metaproj : error MSB4126: The specified solution configuration "Debug|ia 32" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSB uild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [C:\tmp\testproject4\windows\testproject4.sln]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.17 × Restoring NuGet packages × Couldn't restore found packages.config instances. Restoring NuGet packages - exit error code 1 Command failed. Re-run the command with --logging for more information.**]

Is there a way to fix this issue?

0 Answers0