react-native-windows/vnext/Microsoft.ReactNative
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
..
Base Clang portable header fix (#12889) 2024-03-28 16:43:51 -07:00
CxxReactUWP
Fabric TextInput caret becomes visible on non-focused TextInputs on resize (#14091) 2024-11-07 05:06:47 +00:00
Modules Integrate 10/10 (#13996) 2024-11-06 13:37:12 -08:00
Pch Implement HTTP redirection (#10534) 2022-09-16 20:10:43 +00:00
ReactHost Use a legacy native module binding that always returns null in bridgeless mode (#13905) 2024-10-08 11:11:33 -07:00
Utils Upgrade to Windows SDK 10.0.22621.0 (#13287) 2024-06-04 09:43:32 -07:00
Views Add invoke support for 'link' accessibilityRole (#13891) 2024-09-25 16:06:57 -07:00
ABICxxModule.cpp
ABICxxModule.h
ABIViewManager.cpp Adding support for ImageSource on windows #10614 (#10782) 2022-10-27 09:20:07 -07:00
ABIViewManager.h Adds IViewManagerWithOnLayout interface for ABI VMs (#10424) 2022-09-12 09:19:45 -07:00
AsynchronousEventBeat.cpp AsynchronousEventBeat can get locked where it will not beat anymore (#13293) 2024-06-05 09:09:30 -07:00
AsynchronousEventBeat.h Include RuntimeExecutor.h consistently (#12414) 2023-11-16 14:50:45 -08:00
ComponentView.idl [Fabric] Add FocusNavigationDirection and allow overriding of default command handling (#13857) 2024-09-13 14:03:55 -07:00
Composition.Input.idl [Fabric] Enable ScrollView touch scrolling (#13664) 2024-09-10 14:10:00 -07:00
CompositionComponentView.idl Update focus visuals to use cornerRadius and inner/outer strokes (#14008) 2024-10-24 14:12:57 -07:00
CompositionContext.idl Move CompositionSwitcher to Experimental namespace (#12960) 2024-04-23 11:02:51 -07:00
CompositionHwndHost.idl Renaming CompositionRootView as ReactNativeIsland (#13304) 2024-06-06 14:06:16 -07:00
CompositionSwitcher.idl [Fabric] Enable ScrollView touch scrolling (#13664) 2024-09-10 14:10:00 -07:00
CompositionUIService.idl Expose ImageProps from ImageComponentView's and add ImageSource type (#13206) 2024-05-13 10:38:09 -07:00
DesktopWindowMessage.idl
DevMenuControl.cpp
DevMenuControl.h
DevMenuControl.idl Deprecate web debugging (#12724) 2024-02-12 17:27:39 -08:00
DevMenuControl.xaml Deprecate web debugging (#12724) 2024-02-12 17:27:39 -08:00
DocString.h
DocString.idl
DynamicReader.cpp CG: Update async to resolve CVE-2021-43138 (#9837) 2022-04-19 16:12:17 +00:00
DynamicReader.h
DynamicWriter.cpp
DynamicWriter.h
FocusManager.idl [Fabric] Add various native focus APIs (#13234) 2024-05-20 11:01:21 -07:00
GlyphViewManager.cpp Fix typos and add `cspell` configuration (#11536) 2023-05-05 13:12:29 -07:00
GlyphViewManager.h
HResult.h
HttpSettings.idl [Fabric] Support blob: images, and provide better image.onError callbacks (#13285) 2024-06-03 17:15:34 -07:00
IJSValueReader.idl Fix typos and add `cspell` configuration (#11536) 2023-05-05 13:12:29 -07:00
IJSValueWriter.idl Fix typos and add `cspell` configuration (#11536) 2023-05-05 13:12:29 -07:00
INativeUIManager.h Revert rollback of "Simplify root node lookups" (#10840) 2022-11-07 17:02:57 -08:00
IReactCompositionViewComponentBuilder.idl Fix issue with prop cloning with custom native props (#14061) 2024-11-02 08:28:21 -07:00
IReactContext.cpp Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
IReactContext.h Add option to load ship bundles from metro (#11595) 2023-05-11 13:09:37 -07:00
IReactContext.idl Deprecate web debugging (#12724) 2024-02-12 17:27:39 -08:00
IReactDispatcher.cpp Fix Hermes sampling profiler (#11033) 2023-02-09 10:38:33 -08:00
IReactDispatcher.h Fix Hermes sampling profiler (#11033) 2023-02-09 10:38:33 -08:00
IReactDispatcher.idl Update comments in IReactDispatcher.idl (#9959) 2022-05-16 21:16:59 +00:00
IReactModuleBuilder.cpp Add support for turbomodule eventemitters, and codegen (#13555) 2024-08-13 07:35:57 -07:00
IReactModuleBuilder.h Add support for turbomodule eventemitters, and codegen (#13555) 2024-08-13 07:35:57 -07:00
IReactModuleBuilder.idl Add support for turbomodule eventemitters, and codegen (#13555) 2024-08-13 07:35:57 -07:00
IReactNonAbiValue.idl
IReactNotificationService.cpp Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
IReactNotificationService.h Fix `ReactNotificationService` memory leak in `ExecuteJsi` (#10408) 2022-08-17 22:13:34 +00:00
IReactNotificationService.idl
IReactPackageBuilder.idl Make AddTurboModule a non-experimental API (#10489) 2022-09-08 15:35:19 -07:00
IReactPackageBuilderFabric.idl [Fabric] Move UriHandler registration to PackageProvider (#13197) 2024-05-08 13:44:47 -07:00
IReactPackageProvider.idl
IReactPropertyBag.cpp CoreApp API (#9936) 2022-07-19 13:48:06 -07:00
IReactPropertyBag.h CoreApp API (#9936) 2022-07-19 13:48:06 -07:00
IReactPropertyBag.idl CoreApp API (#9936) 2022-07-19 13:48:06 -07:00
IReactViewComponentBuilder.idl Fix issue with prop cloning with custom native props (#14061) 2024-11-02 08:28:21 -07:00
IViewManager.idl Adds IViewManagerWithOnLayout interface for ABI VMs (#10424) 2022-09-12 09:19:45 -07:00
IViewManagerCore.idl Adding support for ImageSource on windows #10614 (#10782) 2022-10-27 09:20:07 -07:00
JSDispatcherWriter.cpp Release long lived JSI objects ASAP (#12385) 2023-11-17 17:03:55 -08:00
JSDispatcherWriter.h Release long lived JSI objects ASAP (#12385) 2023-11-17 17:03:55 -08:00
JsiApi.cpp Integrate RN Nightly 10/16 (#12532) 2023-12-15 13:30:34 -08:00
JsiApi.h Integrate RN Nightly 10/16 (#12532) 2023-12-15 13:30:34 -08:00
JsiApi.idl Integrate RN Nightly 10/16 (#12532) 2023-12-15 13:30:34 -08:00
JsiReader.cpp
JsiReader.h
JsiWriter.cpp Enable TurboModule Promise completion from any thread (#9595) 2022-02-24 10:56:26 -08:00
JsiWriter.h Enable TurboModule Promise completion from any thread (#9595) 2022-02-24 10:56:26 -08:00
LayoutService.cpp Adds LayoutService interface to allow native layout updates (#10671) 2022-11-03 15:30:28 -07:00
LayoutService.h Adds LayoutService interface to allow native layout updates (#10671) 2022-11-03 15:30:28 -07:00
LayoutService.idl Adds LayoutService interface to allow native layout updates (#10671) 2022-11-03 15:30:28 -07:00
Microsoft.ReactNative.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
Microsoft.ReactNative.vcxproj.filters Deprecate and remove the experimental CoreApp APIs and prototype app (#12730) 2024-02-14 11:55:13 -08:00
NativeModulesProvider.cpp
NativeModulesProvider.h
PropertySheet.props
QuirkSettings.cpp Fix various issues with instance shutdown when using bridgeless (#12790) 2024-03-05 08:45:39 -08:00
QuirkSettings.h Fix various issues with instance shutdown when using bridgeless (#12790) 2024-03-05 08:45:39 -08:00
QuirkSettings.idl Install runtime scheduler (#12314) 2023-11-01 13:33:03 -07:00
ReactApplication.cpp Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
ReactApplication.h Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
ReactApplication.idl Adds BundleAppId to ReactInstanceSettings (#11217) 2023-03-17 09:16:00 -07:00
ReactCoreInjection.cpp Enable custom timer factory to be provided (#12856) 2024-03-21 10:14:44 -07:00
ReactCoreInjection.h [Fabric] implement tooltip property (#13941) 2024-10-11 08:14:47 -07:00
ReactCoreInjection.idl Enable custom timer factory to be provided (#12856) 2024-03-21 10:14:44 -07:00
ReactInstanceSettings.cpp Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
ReactInstanceSettings.h Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
ReactInstanceSettings.idl Deprecate web debugging (#12724) 2024-02-12 17:27:39 -08:00
ReactNativeAppBuilder.cpp Cleanup ReactNativeAppBuilder and ReactNativeWin32App (#13983) 2024-10-21 13:12:51 -07:00
ReactNativeAppBuilder.h Cleanup ReactNativeAppBuilder and ReactNativeWin32App (#13983) 2024-10-21 13:12:51 -07:00
ReactNativeAppBuilder.idl Cleanup ReactNativeAppBuilder and ReactNativeWin32App (#13983) 2024-10-21 13:12:51 -07:00
ReactNativeHost.cpp [Fabric] Move UriHandler registration to PackageProvider (#13197) 2024-05-08 13:44:47 -07:00
ReactNativeHost.h Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
ReactNativeHost.idl
ReactNativeIsland.idl [Fabric] Get Modal to host RN components in new hwnd (#13500) 2024-11-01 13:43:19 -07:00
ReactNativeWin32App.cpp Cleanup ReactNativeAppBuilder and ReactNativeWin32App (#13983) 2024-10-21 13:12:51 -07:00
ReactNativeWin32App.h Cleanup ReactNativeAppBuilder and ReactNativeWin32App (#13983) 2024-10-21 13:12:51 -07:00
ReactPackageBuilder.cpp [Fabric] Move UriHandler registration to PackageProvider (#13197) 2024-05-08 13:44:47 -07:00
ReactPackageBuilder.h [Fabric] Move UriHandler registration to PackageProvider (#13197) 2024-05-08 13:44:47 -07:00
ReactPointerEventArgs.cpp Adds option to allow ViewManagers to capture pointer (#8969) 2023-11-08 15:44:57 -08:00
ReactPointerEventArgs.h Adds option to allow ViewManagers to capture pointer (#8969) 2023-11-08 15:44:57 -08:00
ReactPointerEventArgs.idl Adds option to allow ViewManagers to capture pointer (#8969) 2023-11-08 15:44:57 -08:00
ReactRootView.cpp Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
ReactRootView.h Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
ReactRootView.idl Remove ExperimentalUseFabric from ReactRootView (#10559) 2022-09-13 15:30:58 -07:00
ReactSupport.cpp
ReactSupport.h Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
RedBox.cpp Fix typos and add `cspell` configuration (#11536) 2023-05-05 13:12:29 -07:00
RedBox.h Add playground-composition (#10635) 2022-09-28 14:17:10 -07:00
RedBoxErrorFrameInfo.cpp
RedBoxErrorFrameInfo.h
RedBoxErrorInfo.cpp
RedBoxErrorInfo.h
RedBoxHandler.cpp Add playground-composition (#10635) 2022-09-28 14:17:10 -07:00
RedBoxHandler.h
RedBoxHandler.idl Fix typos and add `cspell` configuration (#11536) 2023-05-05 13:12:29 -07:00
SchedulerSettings.cpp Minor cleanup of recent RuntimeScheduler integration (#12410) 2023-11-16 17:15:52 +00:00
SchedulerSettings.h Install runtime scheduler (#12314) 2023-11-01 13:33:03 -07:00
SynchronousEventBeat.cpp Minor cleanup of recent RuntimeScheduler integration (#12410) 2023-11-16 17:15:52 +00:00
SynchronousEventBeat.h Include RuntimeExecutor.h consistently (#12414) 2023-11-16 14:50:45 -08:00
TestHook.cpp
TestHook.h
Theme.idl Rework custom resources API (#13013) 2024-04-30 00:08:57 -07:00
Timer.cpp Enable custom timer factory to be provided (#12856) 2024-03-21 10:14:44 -07:00
Timer.h Enable custom timer factory to be provided (#12856) 2024-03-21 10:14:44 -07:00
Timer.idl Remove unnecessary imports from Timer.idl (#12895) 2024-03-29 10:04:07 -07:00
TurboModulesProvider.cpp Add support for turbomodule eventemitters, and codegen (#13555) 2024-08-13 07:35:57 -07:00
TurboModulesProvider.h Use LongLivedObjects for TurboModule callbacks (#10436) 2022-08-25 20:30:09 +00:00
UriImageManager.idl [Fabric] Support blob: images, and provide better image.onError callbacks (#13285) 2024-06-03 17:15:34 -07:00
Version.rc Add commitid to product version of binaries (#11316) 2023-02-28 15:28:00 -08:00
ViewManagersProvider.cpp
ViewManagersProvider.h
ViewProps.idl Fix issue with prop cloning with custom native props (#14061) 2024-11-02 08:28:21 -07:00
XamlHelper.cpp Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
XamlHelper.h Be more explicit when using winrt::Windows types, to avoid conflicts with WinAppSDK (#12114) 2023-09-06 11:45:28 -07:00
XamlHelper.idl Move ReactTag ABI to XamlHelper (#10485) 2022-09-01 09:34:59 -07:00
XamlLoadState.cpp
XamlLoadState.h
XamlUIService.cpp Revert rollback of "Simplify root node lookups" (#10840) 2022-11-07 17:02:57 -08:00
XamlUIService.h Adds GetReactRootView method to XamlUIService (#10403) 2022-10-27 15:01:43 -07:00
XamlUIService.idl Adds GetReactRootView method to XamlUIService (#10403) 2022-10-27 15:01:43 -07:00
XamlView.cpp Move react tag to an attached property (#9658) 2022-08-31 12:39:38 -07:00
XamlView.h Move react tag to an attached property (#9658) 2022-08-31 12:39:38 -07:00
getLayoutProps.ps1
microsoft.reactnative.def Deprecate and remove the experimental CoreApp APIs and prototype app (#12730) 2024-02-14 11:55:13 -08:00
packages.fabric.lock.json Update WinAppSDK from 1.5 to 1.6 (1.6.240923002) (#13977) 2024-10-18 09:37:02 -07:00
packages.lock.json Automatically set EnableSourceLink for in-repo builds only (#13666) 2024-09-09 20:37:17 +00:00
readme.txt

readme.txt

========================================================================
    C++/WinRT Microsoft.ReactNative Project Overview
========================================================================

This project provides Windows Runtime classes using the C++/WinRT SDK 
component.  The generated Windows Runtime component binary and WinMD 
files can then be consumed by a Universal Windows Platform (UWP) app.

========================================================================
Learn more about C++/WinRT here:
http://aka.ms/cppwinrt/
========================================================================