react-native-windows
react-native-windows copied to clipboard
Build error after updating Visual Studio 2022
Problem Description
VS2022 17.1 causes build error. Reverting to 17.0.6 resolves the build but worth noting I can't see any previous builds on VS Community, only Enterprise and Professional.
Steps To Reproduce
Create a fresh project and build.
Expected Results
Build should succeed.
CLI version
6.4.0
Environment
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.22000
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 18.93 GB / 31.73 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.1.3 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions: 10.0.18362.0, 10.0.19041.0, 10.0.22000.0
IDEs:
Android Studio: Not Found
Visual Studio: 17.1.32228.430 (Visual Studio Community 2022)
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.0 => 0.67.0
react-native-windows: 0.67.3 => 0.67.3
npmGlobalPackages:
*react-native*: Not Found
Target Platform Version
No response
Target Device(s)
Desktop
Visual Studio Version
Visual Studio 2022
Build Configuration
Debug
Snack, code example, screenshot, or link to a repository
No response
VS2022 17.1 causes build error. Reverting to 17.0.6 resolves the build but worth noting I can't see any previous builds on VS Community, only Enterprise and Professional.
Is it safe to assume you had something that was already working at that when you updated from 17.0.6 to 17.1 that it started breaking?
We haven't yet moved to recommending VS2022 by default for RNW, although obviously we're trying to track compatibility issues and ensure they're resolved.
Do you happen to have a standalone repo of your issue here?
Correct, we have an existing app that wouldn't build post upgrade. Not a big deal for us to revert, just wanted to document the issue. I did try just reverting build tools but that didn't work so it's something with 17.1
I did a clean build of rnw to test, with 17.1 it fails, reverting to 17.06 the same project will build without any changes.
We'll keep an eye on VS versions, but FYI don't update to 17.2 preview 2 as there's an (unrelated) RNW incompatibility in that preview (fix already in flight).
We haven't seen this particular error yet but we'll keep an eye out for it too. If you do have something that's a minimal repro, definitely share.
0.69 is getting too close for a sudden toolchain change, moving to 0.70.
This is a priority for 0.71.
This does not repro with 17.3.6 being used in PR #9916.
This issue is reported on an older version of React Native for Windows than is current, and is believed to be fixed in the latest version. Please try to update to the latest version and confirm if your issue still occurs. Per-version documentation is available here
Main has been upgraded to VS 2022, this no longer repros with current versions of VS 2022.