how can I add an existing C# project to a RNW solution? #8410
-
context: I'm looking for an alternative to WPF for making a desktop application. a lot of code has already been written in .NET 5 C# for this application: service classes, entity framework, etc. conceptually, I'm looking to replace the UI layer, swapping out WPF for React Native. (I'm aware it will probably be a little more difficult than just that, but the project is small still; as a point of comparison, I've also been investigating Blazor Desktop.) question: what's the recommended/best/fastest way to take existing .NET 5 C# business logic classes (services, dbcontexts...), and use them in an RNW application? or is this a fool's errand? (maybe worth adding: .NET 5 probably isn't a requirement; we'd like to move to .NET 6 when it's out, since that will be an LTS release.) things I have already tried:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If it helps, this article covers how to host RNW inside a WPF application. Which isn't quite what you're asking for, but maybe relevant? It certainly comes from more of an established app perspective, not just a new project. One key difference coming from WPF to RNW is that RNW is going to create a UWP app, which is going to affect the portability of some of your existing app logic. More on that here. |
Beta Was this translation helpful? Give feedback.
-
on the topic of UWP vs. .NET5, UWP apps do not support .net 5. The currently-experimental way to use .net 5 is to use WinUI3 and the WindowsAppSdk. This is still work in progress. |
Beta Was this translation helpful? Give feedback.
If it helps, this article covers how to host RNW inside a WPF application. Which isn't quite what you're asking for, but maybe relevant? It certainly comes from more of an established app perspective, not just a new project.
One key difference coming from WPF to RNW is that RNW is going to create a UWP app, which is going to affect the portability of some of your existing app logic. More on that here.