gre / react-native-view-shot

Snapshot a React Native view and save it to an image
https://github.com/gre/react-native-view-shot-example
MIT License
2.64k stars 344 forks source link

React-native 0.72 requires higher minimum SDK version for windows. #499

Closed VMBindraban closed 9 months ago

VMBindraban commented 9 months ago

Steps to Reproduce

  1. Install react-native
  2. npm install react-native-view-shot
  3. Install react-native-windows (https://reactnative.dev/docs/out-of-tree-platforms)
  4. npx react-native run-windows

Expected Behavior

To build app.

Actual Behavior

React-native-windows 0.72 has minimum target version of 10.17763.0. (October 2018 update) See: https://microsoft.github.io/react-native-windows/docs/win10-compat

The current minimum version is set to 10.0.17134.0.

× Build failed with message C:\Users\NUCPC\***--app\node_modules\react-native-view-shot\windows\RNViewShot\RNViewShot.csproj : error NU1201: 
Project Microsoft.ReactNative.Managed is not compatible with 
uap10.0.17134 (UAP,Version=v10.0.17134). Project Microsoft.ReactNative.Managed supports: uap10.0.17763 
(UAP,Version=v10.0.17763) [C:\Users\NUCPC\***-app\windows\***-.sln]. 
Check your build configuration.
Command failed. Re-run the command with --logging for more information.

Also, the minimum Windows OS version is set to 10.0.18362.0.

As of Visual Studio 2019 (v16 or v142) and Visual Studio 2022(v17 or v143) you can simply specify "10.0". This allows a lot more flexibility to the developer or build machine as there is a growing number of different windows 10 SDK out there now.

Environment