[0.74] Use HybridCRT for react-native-win32 #15475
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implement Hybrid CRT to improve Windows 10 compatibility for react-native-win32.dll
Type of Change
Why
We have reports that react-native-win32.dll fails to load on older Windows 10 versions
that don't have the Visual C++ 2015-2022 Redistributable installed. The DLL currently requires
VCRUNTIME140_1.dll and MSVCP140_1.dll which aren't present out-of-the-box.
What
This PR applies the Hybrid CRT approach used by the Windows App SDK:
See: https://github.com/microsoft/WindowsAppSDK/blob/main/docs/Coding-Guidelines/HybridCRT.md
Binary size impact: 140,800 bytes (6,199,296 -> 6,340,096), ~2.3% increase.
Implementation details:
.Hybrid.vcxprojwrapper projects that import base projects withUseHybridCRT=trueTesting
dumpbin /dependentsChangelog
Should this change be included in the release notes: yes
Improved Windows 10 compatibility - react-native-win32.dll no longer requires Visual C++ Redistributable to be installed
Microsoft Reviewers: Open in CodeFlow