react-native-windows/vnext/Desktop.IntegrationTests
Jon Thysell 6faf5685d4
Add RnwNewArch property and RNW_NEW_ARCH constants when building projects for the new architecture (#14042)
## Description

This PR adds a `RnwNewArch` MSBuild property and `RNW_NEW_ARCH` build-time constant / pre-processor directive for use by external (module) devs. This PR also updates `@react-native-windows/codegen` to use the directive when appropriate, and also applies those changes to `sample-custom-component`.

The expectation is that external devs now use these new properties and directives instead of the previously exposed `UseFabric`, `UseHermes` and/or `UseWinUI3` props. All logic expecting external developers to manually set those props has been removed and replaced with more robust checking that keys off `RnwNewArch` and throws warnings or errors if the other props aren't set correctly.

In addition, this PR adds further checks to make sure external projects load the WindowsSDK props sheet, followed by the appropriate RNW props and then the RNW targets. Failure to load these import properly would always risk putting the project in a broken state, now we at least tell people what they're missing.

Note: Old arch devs will still be able to toggle `UseHermes`.

### Type of Change
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- This change requires a documentation update

### Why
We don't want end-users to have access to conditionally build their code for the new or old architectures, without having to use/replicate the current complicated un-scoped directives we use internally.

Closes #13929 

### What
See above.

## Screenshots
N/A

## Testing
Verified the flag exists and builds for the sample-custom-component. Also verified that new projects build properly.

## Changelog
Should this change be included in the release notes: _yes_

Add RnwNewArch property and RNW_NEW_ARCH constants when building projects for the new architecture
2024-11-07 12:04:12 -08:00
..
Modules
ChakraRuntimeHolder.cpp
ChakraRuntimeHolder.h
DesktopTestInstance.cpp
DesktopTestInstance.h
DesktopTestRunner.cpp
HttpOriginPolicyIntegrationTest.cpp
HttpResourceIntegrationTests.cpp
RNTesterIntegrationTests.cpp
React.Windows.Desktop.IntegrationTests.vcxproj Add RnwNewArch property and RNW_NEW_ARCH constants when building projects for the new architecture (#14042) 2024-11-07 12:04:12 -08:00
React.Windows.Desktop.IntegrationTests.vcxproj.filters
WebSocketIntegrationTest.cpp
WebSocketResourcePerformanceTests.cpp
packages.lock.json