.NET Core 2.1 can't reference a .NET Framework 4.7.2 Class library

前端 未结 1 1081
遥遥无期
遥遥无期 2020-12-11 01:57

I have a .NET Core 2.1 app, a .NET MVC website (4.7.2) and I also have a .NET 4.7.2 class library.

What I\'m trying to do is have my core 2.1 project reference the

相关标签:
1条回答
  • 2020-12-11 02:36

    You can reference .NET Standard library instead. So you need to create .NET Standard library with common shared logic and reference it from both - .NET Core and .NET Framework ("full") projects.

    Note that while you may be able to use .NET Standard without PackageReference, it's recommended to do it this way. Find more details in Referencing .NET Standard Assemblies from both .NET Core and .NET Framework.

    0 讨论(0)
提交回复
热议问题