I'm adding a new dotnetcore (RC2) project to my existing solution which contains a set of dotnet framewotk 4.5 projects.
When I try to add a reference in my brand new dotnetcore project I get a message telling me that I can't do a reference from a project that targets framework 4.5.
The following projects are not supported references: "project name" has target frameworks that are incompatible with targets in current project "project name"
I followed this thread but I didn't find any clear solution for the issue.
what's the recommended approach for this situation?
Replace your library's project file with a new Class Library (Portable)
project (PCL). Once there, you can target a PCL profile or the new Net Standard
You can also have 2 separated project files, building the same source files, but each one targeting a different frameworks/target (one for PCL, one for .NET fw).
Here you have a step-by-step: https://oren.codes/2016/06/23/portable-is-dead-long-live-netstandard/
来源:https://stackoverflow.com/questions/37842366/compatibility-between-dotnetcore-and-framework-4-5