I'm currently developing a WPF project which communicates with an ASP.NET Core Server application which is running on a Windows Server 2012 machine. To use my models in both classes I'm using a class library in the middle.
My current layout looks like this:
WPF - .NET 4.6
Class Library - PCL NetStandard1.3
WinForms Application - .NET4.6
ASP.NET Core - .NET4.6
Everything works so far except using DataAnnotations within the PCL. I have defined my DbContext and my Identity Models inside the PCL too.
As longer I'm working on this project I think that this is the wrong layout for this. As soon as I'm using a classic class library I'm not able to add Identity.EntityFramework to the porject.
Can anybody give me a hint if there is a better solution for my project layout or I'm doing it the completely wrong way?
Thanks for any help!
UPDATE
Okay, I could get it to work. I accidentally used the Portable Class Library Template from Visual Studio. When I switched to Net Standard Library Template and just added the .Net 4.6 Framework DataAnnotations worked. To reference library from WPF and WinForms I had to reference directly to the dll because the project reference didn't work.