microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.34k stars 1.14k forks source link

Support for EWDK #7607

Closed oldoldman closed 3 years ago

oldoldman commented 3 years ago

I'm following this doc to go through the steps of running react-native-windows app. When running npx react-native run-windows in an EWDK build command window, I got stuck with following error

Looking for vswhere at: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
 ‼ No public VS release found
 i Trying pre-release VS
Looking for vswhere at: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
 × Unable to find vswhere at C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

Is there some workaround of this ? Many thanks.

asklar commented 3 years ago

@oldoldman can you confirm whether you've installed the dependencies? the instructions can be found here: http://aka.ms/rnw-deps You'll likely need to close the cmd/ps window after installing the dependencies and reopen a new one.

ghost commented 3 years ago

This issue lacks the environment info requested in the bug template. Please edit your issue report to add this information.

If you are using latest version:

  1. npx react-native --version:
  2. npx react-native run-windows --info:

Otherwise if --info doesn't exist:

  1. react-native -v:
  2. npm ls rnpm-plugin-windows:
  3. npm ls react-native-windows:
  4. node -v:
  5. npm -v:
  6. yarn --version:
ghost commented 3 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 14 days of this comment.

oldoldman commented 3 years ago

I've found a workaround , but it is not easy. I would like to suspend this issue. Thank you guys.

josiext commented 2 years ago

How did u solve it ?

oldoldman commented 2 years ago

Hack the build script which will detect the cl command line and call it later to compile the cpp files. The build system is complicated,so it is not an easy task. Update Roughly you can first locate the part which call vswhere, for example: findstr /ns vswhere *.js Comments the related logic Then find the part which call cl command line , replace it with path to the EWDK cl. Good luck!