Skip to content

react-native run-windows can't find the installed SDKs when SDK is not installed to default location #3763

@licanhua

Description

@licanhua

I'm using VS2019 16.3.10. When I install VS, I changed the default installation location from C: to D:
After the installation, VS is installed to D:\Program Files (x86), but Windows Kits is installed to D: other than D:\Program Files (x86).
In this case, react-native run-windows can't find the SDKs, but it's OK if I build it from VS IDE.

Build output

react-native run-windows
 √ Found NuGet Binary
 √ Found MSBuild v16.0 at D:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin (16.3.29519.87)
- Restoring NuGetsC:\Users\xx\AppData\Local\Temp\nuget.4.9.2.exe
 √ Restoring NuGets
 × Build failed with message Error: Must have a minimum Windows SDK version 10.0.18362.0 installed. Check your build configuration.
D:\repo\react-native-windows\packages\E2ETest>react-native run-windows --info

  System:
    OS: Windows 10 10.0.19033
    CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
    Memory: 16.12 GB / 31.79 GB
  Binaries:
    Node: 10.12.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.19.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
  npmPackages:
    react-native: https://github.com/microsoft/react-native/archive/v0.60.0-microsoft.28.tar.gz => 0.60.0-microsoft.24
    react-native-windows: 0.60.0-vnext.91 => 0.60.0-vnext.91
    rnpm-plugin-windows: ^0.3.8 => 0.3.8
  Installed UWP SDKs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions