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

Simplify support for .Net Native in C++ projects #4557

Closed
vmoroz opened this issue Apr 10, 2020 · 0 comments · Fixed by #5851
Closed

Simplify support for .Net Native in C++ projects #4557

vmoroz opened this issue Apr 10, 2020 · 0 comments · Fixed by #5851
Assignees
Labels
Area: Core DLL ABI-safe RNW DLL
Milestone

Comments

@vmoroz
Copy link
Member

vmoroz commented Apr 10, 2020

Our current SampleAppCpp has quite a few lines of code to support .Net Native based C# component assemblies. We must simplify the code:

  • Make it optional if it adds extra to the package and be used only when .Net references are present.
  • Change CLI templates to use the .Net Native oriented additions.
@vmoroz vmoroz added the Area: Core DLL ABI-safe RNW DLL label Apr 10, 2020
@ghost ghost added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Apr 10, 2020
@chrisglein chrisglein removed the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Apr 10, 2020
@chrisglein chrisglein added this to the 0.63 (M6) milestone Apr 10, 2020
@chrisglein chrisglein modified the milestones: 0.63, Backlog Jul 13, 2020
@dannyvv dannyvv modified the milestones: Backlog, 0.64 Aug 22, 2020
@dannyvv dannyvv linked a pull request Aug 27, 2020 that will close this issue
jonthysell added a commit that referenced this issue Aug 27, 2020
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 `<ConsumeCSharpModules>true</ConsumeCSharpModules>` in your app project.

This PR also fixes up the template solution files to include the projects they were missing.

Closes #5825
Closes #4557
jonthysell added a commit to jonthysell/react-native-windows that referenced this issue Aug 27, 2020
…5851)

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 `<ConsumeCSharpModules>true</ConsumeCSharpModules>` in your app project.

This PR also fixes up the template solution files to include the projects they were missing.

Closes microsoft#5825
Closes microsoft#4557
jonthysell added a commit that referenced this issue Aug 27, 2020
)

This change backports #5851 to 0.63

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 `<ConsumeCSharpModules>true</ConsumeCSharpModules>` in your app project.

This PR also fixes up the template solution files to include the projects they were missing.

Closes #5825
Closes #4557
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core DLL ABI-safe RNW DLL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants