Project 'ClassLibrary1.csproj' targets 'netcoreapp2.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.7.2'

后端 未结 1 1739
暖寄归人
暖寄归人 2021-01-07 17:21

I have two class library project with the following setting:

  • ClassLibrary1 --> Target framework-->.NET Core 2.1
  • ClassLibrary2 --> Target framework-->.
相关标签:
1条回答
  • 2021-01-07 17:46

    You are not able to reference:

    • .NET Core libraries from .NET Framework
    • .NET Framework libraries from .NET Core

    If you want to share code between those two libraries you have to use .NET Standard libraries.

    .NET Standard is a kind of interface, a versioned list of APIs that you can call, .NET Framework and .NET Core implements this standard

    Please see for reference: .NET Standard

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