Reputation:
What is the best practice to share a library (also C# project) between Windows UWP app and a .NET Core web app?
I have the following solution setup starting from scratch:
As far as I could figure out, the only solution is, to create two projects for the lib, which share the same .cs files. But this feels a bit like a workaround and I am looking for a "clean(er)" way.
Upvotes: 3
Views: 591
Reputation: 4232
You can share a .NET Standard 2.0 library between those projects, see Microsoft's documentation.
Note, that you cannot use any classes specific to .NET Core or the UWP in such a project.
Upvotes: 5