Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.62] Fixed templates so C++ apps can consume C# native modules #5851 #6230

Closed
wants to merge 129 commits into from

Conversation

jonthysell
Copy link
Contributor

@jonthysell jonthysell commented Oct 12, 2020

This change backports (part of) #5851 to 0.62.

It does not update the apps in the repo, only adds the props/targets to unblock customers with C# modules who need to support 62.

Original PR:

Right now C++/WinRT apps have a hard time consuming C# WinRT libraries from source. We fixed this in our SampleAppCpp in order to load SampleLibraryCS, but those fixes were not put into the template for the benefit of all apps.

This PR moves the fix into new CppAppConsumeCSharpModule.(props|targets) files. Since the fix involves importing a ton of other props/targets, and we don't want to risk breaking existing C++ apps who have no need of consuming C#-based native modules, the changes are behind a new property ConsumeCSharpModules.

So if you have a C++/WinRT RNW app (the default) and need to consume C# native module, you can set true in your app project.

Microsoft Reviewers: Open in CodeFlow

NickGerleman and others added 30 commits April 26, 2020 23:47
* Added C# ReactContext for Module Initialize method

* Change files

* Fixed sample project compilation
* Update react version

* Change files
* .net projects need more work to build a package layout

* Change files

* make async
* Package Fixes

1. Use looser peer dependencies on React Native. 0.61 specified 0.61.5 explicitly, but based on recent discussion we want to allow patch releases of RN to work on any RNW version. Allow prerelease versions as well for any special forks, etc.

2. Fixup React Version everywhere. I missed upgraded React dependencies during the 0.62 upgrade. This was fixed in vnext and e2etest with microsoft#4734 but other packages were not updated. Update everything here.

* Change files
* Stop publishing ReactHwp NuGet Package

We no longer support ReactUwp in 0.62. Stop publishing a NuGet package with it.

* Change files

* Remove stale variable

* Remove another stale var
* Delay load ChakraCore.dll

* Change files

Co-authored-by: tudorm <[email protected]>
…ication (microsoft#4755)

* Removed the ref count work around from classes derived from ReactApplications

* Change files
* Treat yes the same as y in template overwrite prompt

* Change files
* Disable CxxFrameHandler4

V142 Build tools turn on FH4 (CxxFrameHandler4) by default. This reduces the size of EH maps, but leads to incompatibility with code compiled using older toolsets.

Disable FH4 until consumers (i.e. Office) are on an ABI-safe API or are updated.

Microsoft.ReactNative.dll x64 Release Size:
Before: 2,139 KB
After: 2,294 KB

* Change files
* Promote awaitable DispatchQueue callback to member field
* Ensure InitializeCore is run before app code

* Change files
Cherry-Pick More Changes into 0.62-stable
* Correct binary message tagging

* Change files
…ft#4838)

* Single Targets for CLI app templates (microsoft#4816)

This PR updates the CLI app templates to point to a single (per language) target file, and adds stubs for files that will be generated by autolinking.

* Added Microsoft.ReactNative.CSharpApp.props|targets and updated cs app template
* Added Microsoft.ReactNative.CppApp.props|targets and updated cpp app templates
* Added AutolinkedNativeModules.g.targets and AutolinkedNativeModules.g.h to cpp templates
* Added AutolinkedNativeModules.g.targets and AutolinkedNativeModules.g.cs to cs template
* Added VSProjectUtils.ps1 for nuget package management

* Ensure Beachball Uses The Right Branch for Experimental NuGet PR Tests (microsoft#4837)

During the 0.61 timeframe, CI changes were added to use PR target branch in beachball scripts to avoid needing to manually change CI scripts when branching. Experimental Nuget work added a new usage without injecting PR target branch. This currently leads to CI failures when adding new changes to the 0.62 branch.

Make sure to use the right branch here.

Co-authored-by: Nick Gerleman <[email protected]>
Updating readme to be reflected in npm package version.

Co-authored-by: Andrew Coates <[email protected]>
* - Change MouseEnter/MouseLeave behavior to match web behavior
- Improve performance of frequently-called mouse move handler

* Change files

* Update mouse sample

* Fix
* fix appPackage path

* Change files

* More fix

* lint fix

* Concat paths directly
…icrosoft#4817)

* Implemented PropertyBag for ReactContext and ReactInstanceSettings

* Change files

* yarn format

* Delete the old PropertyBag files.

* Make PropertyBag's ToObject and FromObject methods private.

* Renamed some classes and methods.

* Fixed sample project compilation

* VS updates the sln file

* VS automatically updated solutions
acoates-ms and others added 27 commits August 20, 2020 08:40
…cemaps (microsoft#5783)

* [Win32] Publish TS files in src as they are references in sourcemaps (microsoft#5774)

* Publish TS files in src as they are references in sourcemaps

* Change files

Co-authored-by: Andrew Coates <[email protected]>

* update change files

* Change files

* delete bad change file

Co-authored-by: Andrew Coates <[email protected]>
…ft#5808)

* Enable logbox support on 0.62 with experimental flag

* Unneeded change

* Change files

Co-authored-by: Andrew Coates <[email protected]>
…or all archs (microsoft#5840)

* [0.62] Fix deploy bug when framework packages are installed but not for all archs

* Change files

Co-authored-by: Alexander Sklar <[email protected]>
* Fix Inspector in react-native-win32 0.62

We used to not have automatic dependency syncing. This led to an out-of-date depedency on react-devtools-core, which changed how certain globals touched by RN are represented. In effect, launching Inspector from the debug menu (and likely other places) was broken.

Manually sync dependencies with RN core. This is still in a hazy state, since we don't declare everything we should, but the issue is resolved in later versions of RNW.

* Change files

* Disable test disabled in master which tests logging capabilities of stub instance

* Change files
* Promote 0.62 to legacy

* Change files
…icrosoft#5871)

* Drop remaining ShadowNodes in UIManager dtor

* Change files
…32 asserts. (microsoft#5888)

* A couple of minor style changes in logbox to avoid win32 asserts.

* Change files

* overrides file changes

* lint fixes
* Published nuget was missing slices.

* revert auto formatting

* Make PRs use same slices as before

Co-authored-by: Andrew Coates <[email protected]>
* Backport arm64 support from master.

* Upgrade to Microsoft.ChakraCore.vc140 1.11.20

* Upgrade to Microsoft.Windows.CppWinRT 2.0.200615.7

* Upgrade to ReactNative.V8Jsi.Windows 0.3.4

* Upgrade to ReactWindows.OpenSSL.StdCall.Static 1.0.2-p.5

* Upgrade to Boost 1.72 (microsoft#5200)

* Upgrade to boost 1.72.0

* clang format

* Update x64 export symbols

* Rename SecureWebSocket to SecureWebSocketResource

* Make Beast WS resources shared_from_this.

* [REVERT] Force Beast implementation.

* Define and use SharedFromThis()

* Updated TODO/revert comments.

* Define OnSslHandshake

* clang format

* Change files

* Update version in playground projects

* Removed beast validation-only changes

* Remove conflicting package references

* Change files

* Remove Microsoft.SourceLink.GitHub

* Remove Microsoft.Build.Tasks.Git

* Downgrade to Microsoft.Windows.CppWinRT 2.0.200615.7
* Build fix

* Change files

Co-authored-by: Andrew Coates <[email protected]>
* Update V8 and Hermes package versions

* Change files

* yarn format
* Port update folly to 0.62

* .

* Change files

* fix exports

* .

* format

* update layoutheaders

* ReactDirectories.props

* remove demangle export

Co-authored-by: Alexander Sklar <[email protected]>
microsoft#5991)

* Fix for intermittent shutdown crash from websockets

* Change files

* nits

* Bump timeouts

* longer timeout

* Turn off flaky tests

Co-authored-by: Andrew Coates <[email protected]>
* Add missing exports

* Change files
…items (microsoft#6053)

* Rename ReactWindowsCore.vcxitems -> ReactWindowsCore-Items.vcxitems

* Change files

* Additional rename
…r fix (microsoft#6075)

* Revert folly back to 2019.09.30.00 with patch file for compiler fix

* formatting
@jonthysell jonthysell requested a review from a team as a code owner October 12, 2020 21:55
@jonthysell jonthysell closed this Oct 12, 2020
@jonthysell jonthysell deleted the cpp-csharp branch October 29, 2020 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.